[hibernate-commits] Hibernate SVN: r10254 - trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Mon Aug 14 06:20:24 EDT 2006


Author: max.andersen at jboss.com
Date: 2006-08-14 06:20:21 -0400 (Mon, 14 Aug 2006)
New Revision: 10254

Modified:
   trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java
Log:
line no info with import.sql

Modified: trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java
===================================================================
--- trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java	2006-08-14 00:19:48 UTC (rev 10253)
+++ trunk/Hibernate3/src/org/hibernate/tool/hbm2ddl/SchemaExport.java	2006-08-14 10:20:21 UTC (rev 10254)
@@ -237,8 +237,10 @@
 			throws IOException {
 		log.info( "Executing import script: " + importFile );
 		BufferedReader reader = new BufferedReader( importFileReader );
+		long lineNo = 0;
 		for ( String sql = reader.readLine(); sql != null; sql = reader.readLine() ) {
 			try {
+				lineNo++;
 				String trimmedSql = sql.trim();
 				if ( trimmedSql.length() == 0 ||
 				     trimmedSql.startsWith( "--" ) ||
@@ -255,7 +257,7 @@
 				}
 			}
 			catch ( SQLException e ) {
-				throw new JDBCException( "Error during import script execution", e );
+				throw new JDBCException( "Error during import script execution at line " + lineNo, e );
 			}
 		}
 	}




More information about the hibernate-commits mailing list