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:04:06 -04:00 committed by Brett Meyer
parent 68918d29a3
commit 7ca36585a9
1 changed files with 7 additions and 1 deletions

View File

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