HHH-9040 Added halt on error support for scripts importing

Conflicts:
	hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java
This commit is contained in:
Libor Ondrusek 2014-03-12 17:06:00 -04:00 committed by Brett Meyer
parent a71eb4786a
commit 26fadde9d3
1 changed files with 7 additions and 4 deletions

View File

@ -514,10 +514,13 @@ public class SchemaExport {
} }
} }
catch ( Exception e ) { catch ( Exception e ) {
throw new ImportScriptException( if (haltOnError) {
"Error during statement execution (file: '" + namedReader.getName() + "'): " + trimmedSql, throw new ImportScriptException( "Error during statement execution (file: '"
e + namedReader.getName() + "'): " + trimmedSql, e );
); }
exceptions.add(e);
LOG.unsuccessful(trimmedSql);
LOG.error(e.getMessage());
} }
} }
} }