platform/bb/Hsqldb/src/org/hsqldb/persist/ScriptRunner.java in rhodes-1.2.2 vs platform/bb/Hsqldb/src/org/hsqldb/persist/ScriptRunner.java in rhodes-1.4.0

- old
+ new

@@ -59,11 +59,11 @@ * This is used to read the *.log file and manage any necessary * transaction rollback. * * @throws HsqlException */ - public static void runScript(Database database, String logFilename, + /*public static void runScript(Database database, String logFilename, int logType) throws HsqlException { IntKeyHashMap sessionMap = new IntKeyHashMap(); Session sysSession = database.getSessionManager().getSysSession(); Session current = sysSession; @@ -150,39 +150,40 @@ if (current.isClosed()) { sessionMap.remove(currentId); } } - } catch (Throwable e) { + } catch (Exception e) { String message; // catch out-of-memory errors and terminate if (e instanceof EOFException) { // end of file - normal end - } else if (e instanceof OutOfMemoryError) { - message = "out of memory processing " + logFilename - + " line: " + scr.getLineNumber(); - - database.logger.appLog.logContext(SimpleLog.LOG_ERROR, - message); - - throw Trace.error(Trace.OUT_OF_MEMORY); } else { // stop processing on bad log line message = logFilename + " line: " + scr.getLineNumber() + " " + e.toString(); database.logger.appLog.logContext(SimpleLog.LOG_ERROR, message); } + } catch (OutOfMemoryError e) { + String message = "out of memory processing " + logFilename + + " line: " + scr.getLineNumber(); + + database.logger.appLog.logContext(SimpleLog.LOG_ERROR, + message); + + throw Trace.error(Trace.OUT_OF_MEMORY); + } finally { if (scr != null) { scr.close(); } database.getSessionManager().closeAllSessions(); database.setReferentialIntegrity(true); } - } + }*/ }