Update of /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util
In directory sc8-pr-cvs1:/tmp/cvs-serv19888/net/sf/hibernate/util
Modified Files:
JDBCExceptionReporter.java
Log Message:
wrap all SQLExceptions fixed a bug in SchemaExport where generated foreign key constraints did not used qualified tablename for referenced table
Index: JDBCExceptionReporter.java
===================================================================
RCS file: /cvsroot/hibernate/Hibernate2/src/net/sf/hibernate/util/JDBCExceptionReporter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** JDBCExceptionReporter.java 5 Jan 2003 02:11:25 -0000 1.3
--- JDBCExceptionReporter.java 14 Jan 2003 13:42:18 -0000 1.4
***************
*** 16,48 ****
if ( log.isDebugEnabled() && warning!=null ) log.debug( "SQL Warning", warning );
while (warning != null) {
! log.warn( new StringBuffer(30)
! .append("SQL Warning: ")
! .append( warning.getErrorCode() )
! .append(", SQLState: ")
! .append( warning.getSQLState() )
! .toString()
! );
! log.warn( warning.getMessage() );
! warning = warning.getNextWarning();
}
}
- }
! public static void logExceptions(SQLException ex) {
! if ( log.isErrorEnabled() ) {
! if ( log.isDebugEnabled() ) log.debug( "SQL Exception", ex );
! while (ex != null) {
! log.warn( new StringBuffer(30)
! .append("SQL Error: ")
! .append( ex.getErrorCode() )
! .append(", SQLState: ")
! .append( ex.getSQLState() )
! .toString()
! );
! log.error( ex.getMessage() );
! ex = ex.getNextException();
}
- }
- }
}
--- 16,50 ----
if ( log.isDebugEnabled() && warning!=null ) log.debug( "SQL Warning", warning );
while (warning != null) {
! log.warn(
! new StringBuffer(30)
! .append("SQL Warning: ")
! .append( warning.getErrorCode() )
! .append(", SQLState: ")
! .append( warning.getSQLState() )
! .toString()
! );
! log.warn( warning.getMessage() );
! warning = warning.getNextWarning();
! }
}
}
! public static void logExceptions(SQLException ex) {
! if ( log.isErrorEnabled() ) {
! if ( log.isDebugEnabled() ) log.debug( "SQL Exception", ex );
! while (ex != null) {
! log.warn(
! new StringBuffer(30)
! .append("SQL Error: ")
! .append( ex.getErrorCode() )
! .append(", SQLState: ")
! .append( ex.getSQLState() )
! .toString()
! );
! log.error( ex.getMessage() );
! ex = ex.getNextException();
! }
! }
}
}
|