Commit 1f8c7fea authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

We are now printing the failed SQL to the error log so that administrators...

We are now printing the failed SQL to the error log so that administrators have an idea of what happened.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10075 b35dd754-fafc-0310-a699-88a17e54d16e
parent c0099b20
......@@ -344,9 +344,16 @@ public class SchemaManager {
DbConnectionManager.getDatabaseType() == DbConnectionManager.DatabaseType.db2) {
command.deleteCharAt(command.length() - 1);
}
Statement stmt = con.createStatement();
stmt.execute(command.toString());
stmt.close();
try {
Statement stmt = con.createStatement();
stmt.execute(command.toString());
stmt.close();
}
catch (SQLException e) {
// Lets show what failed
Log.error("SchemaManager: Failed to execute SQL:\n"+command.toString());
throw e;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment