From 26fadde9d3373c4cff931040fd77049cd423ad50 Mon Sep 17 00:00:00 2001 From: Libor Ondrusek Date: Wed, 12 Mar 2014 17:06:00 -0400 Subject: [PATCH] HHH-9040 Added halt on error support for scripts importing Conflicts: hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java --- .../java/org/hibernate/tool/hbm2ddl/SchemaExport.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java b/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java index 095bbc70e3..dd6335b1da 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java @@ -514,10 +514,13 @@ public class SchemaExport { } } 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()); } } }