Use dedicated catch block for ScriptException
Closes gh-24383
This commit is contained in:
parent
7575616d26
commit
1acf5a7424
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -52,10 +52,10 @@ public abstract class DatabasePopulatorUtils {
|
|||
DataSourceUtils.releaseConnection(connection, dataSource);
|
||||
}
|
||||
}
|
||||
catch (ScriptException ex){
|
||||
throw ex;
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
if (ex instanceof ScriptException) {
|
||||
throw (ScriptException) ex;
|
||||
}
|
||||
throw new UncategorizedScriptException("Failed to execute database script", ex);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue