code: public void reportSqlError(String message, java.sql.SQLException sqlEx)
      {
          StringBuffer strBufMessages = new StringBuffer();
          java.sql.SQLException currentSqlEx = sqlEx;
          do
          {
              strBufMessages.append("\n" + sqlEx.getErrorCode() + ":" + sqlEx.getMessage());
              currentSqlEx = currentSqlEx.getNextException();
          } while (currentSqlEx != null);        
          System.err.println(message + strBufMessages.toString());
          sqlEx.printStackTrace();
      }
docs: Method for reporting SQLException. This is used by
  the treenodes if retrieving information for a node
  is not successful.
  @param message The message describing where the error occurred
  @param sqlEx The exception to be reported.