Log to stderr and return null in case of missing queries
The rationale for not throwing an exception is that the QueryStore class
currently has "update variants", both for single queries and additional
queries (e.g. add-person-universities).
@@ -39,8 +39,8 @@ public abstract class QueryStore {
try {
return new String(Files.readAllBytes(Paths.get(filePath)));
} catch (IOException e) {
- //throw new DbException("Could not load query: " + filePath);
- return "";
+ System.err.printf("Unable to load query from file: %s", filePath);
+ return null;
}
}
