if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Failed to execute SQL script statement at line " + lineNumber + " of resource " + resource + ": " + statement, ex);
}
} else {
Exception nextException = ex.getNextException();
throw new ScriptStatementFailedException(statement, lineNumber, resource, nextException != null? nextException : ex);
}
}
}
} finally {
stmt.executeBatch();