I'm trying to debug a problem running queries against the XMLDB, but the error messages are not as helpful as they could be:
- The
XMLDB.openDatabase methods throw an error if the DB was previously open, but not if the call to new XMLDB() fails.
DbViewer.runBatch doesn't check that the database was opened correctly either. This results in later attempts to use the not-open DB, producing the misleading error message "Could not find scenarios to run."
DbViewer.runBatch calls XMLDB.getInstance to see if the DB is open, but this produces the spurious message "The database is not open". It would be better to have a method that just returns whether XMLDB.xmldbInstance == NULL for this use case.
I'm trying to debug a problem running queries against the XMLDB, but the error messages are not as helpful as they could be:
XMLDB.openDatabasemethods throw an error if the DB was previously open, but not if the call tonew XMLDB()fails.DbViewer.runBatchdoesn't check that the database was opened correctly either. This results in later attempts to use the not-open DB, producing the misleading error message"Could not find scenarios to run."DbViewer.runBatchcallsXMLDB.getInstanceto see if the DB is open, but this produces the spurious message"The database is not open". It would be better to have a method that just returns whetherXMLDB.xmldbInstance == NULLfor this use case.