in old/dekaf-core/src/main/java/org/jetbrains/dekaf/sql/Scriptum.java [167:194]
public final TextFileFragment getText(@NotNull String name) throws ScriptNotFoundException{
TextFileFragment fragment = findText(name);
if (fragment != null) {
return fragment;
}
else {
// some useful diagnostics
StringBuilder b = new StringBuilder();
b.append("No such script with name: ").append(name).append('\n');
boolean was = false;
for (ScriptumResource r : myResources) {
for (String existentName : r.getExistentNames()) {
if (!was) {
b.append("There are scripts: ");
was = true;
}
else {
b.append(", ");
}
b.append(existentName);
}
}
if (!was) {
b.append("There are no scripts at all");
}
throw new ScriptNotFoundException(b.toString());
}
}