/** * Print information about the SQL exception to the given PrintWriter. Walk the list of * exceptions, if any. * * @param out the place to write to * @param e the exception to display */ public static void ShowSQLException(PrintWriter out, SQLException e) { String errorCode; if (getSystemBoolean("ij.showErrorCode")) { errorCode = LocalizedResource.getMessage("UT_Error0", LocalizedResource.getNumber(e.getErrorCode())); } else { errorCode = ""; } while (e != null) { String p1 = mapNull(e.getSQLState(), LocalizedResource.getMessage("UT_NoSqlst")); String p2 = mapNull(e.getMessage(), LocalizedResource.getMessage("UT_NoMessa")); out.println(LocalizedResource.getMessage("UT_Error012", p1, p2, errorCode)); doTrace(out, e); e = e.getNextException(); } }
public static void ShowSQLException(PrintStream out, SQLException e) { String errorCode; if (getSystemBoolean("ij.showErrorCode")) { errorCode = " (errorCode = " + e.getErrorCode() + ")"; } else { errorCode = ""; } while (e != null) { out.println( "ERROR " + mapNull(e.getSQLState(), "(no SQLState)") + ": " + mapNull(e.getMessage(), "(no message)") + errorCode); doTrace(out, e); e = e.getNextException(); } }