mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
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:
parent
68918d29a3
commit
7ca36585a9
@ -448,7 +448,13 @@ private void importScript(NamedReader namedReader, List<Exporter> exporters) thr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user