|
@@ -645,16 +645,16 @@ public class SQLExec extends JDBCTask { |
|
|
} |
|
|
} |
|
|
} catch (IOException e) { |
|
|
} catch (IOException e) { |
|
|
closeQuietly(); |
|
|
closeQuietly(); |
|
|
|
|
|
setErrorProperty(); |
|
|
if (onError.equals("abort")) { |
|
|
if (onError.equals("abort")) { |
|
|
throw new BuildException(e, getLocation()); |
|
|
throw new BuildException(e, getLocation()); |
|
|
} |
|
|
} |
|
|
setErrorProperty(); |
|
|
|
|
|
} catch (SQLException e) { |
|
|
} catch (SQLException e) { |
|
|
closeQuietly(); |
|
|
closeQuietly(); |
|
|
|
|
|
setErrorProperty(); |
|
|
if (onError.equals("abort")) { |
|
|
if (onError.equals("abort")) { |
|
|
throw new BuildException(e, getLocation()); |
|
|
throw new BuildException(e, getLocation()); |
|
|
} |
|
|
} |
|
|
setErrorProperty(); |
|
|
|
|
|
} finally { |
|
|
} finally { |
|
|
try { |
|
|
try { |
|
|
if (getStatement() != null) { |
|
|
if (getStatement() != null) { |
|
@@ -788,13 +788,13 @@ public class SQLExec extends JDBCTask { |
|
|
goodSql++; |
|
|
goodSql++; |
|
|
} catch (SQLException e) { |
|
|
} catch (SQLException e) { |
|
|
log("Failed to execute: " + sql, Project.MSG_ERR); |
|
|
log("Failed to execute: " + sql, Project.MSG_ERR); |
|
|
|
|
|
setErrorProperty(); |
|
|
if (!onError.equals("abort")) { |
|
|
if (!onError.equals("abort")) { |
|
|
log(e.toString(), Project.MSG_ERR); |
|
|
log(e.toString(), Project.MSG_ERR); |
|
|
} |
|
|
} |
|
|
if (!onError.equals("continue")) { |
|
|
if (!onError.equals("continue")) { |
|
|
throw e; |
|
|
throw e; |
|
|
} |
|
|
} |
|
|
setErrorProperty(); |
|
|
|
|
|
} finally { |
|
|
} finally { |
|
|
if (resultSet != null) { |
|
|
if (resultSet != null) { |
|
|
try { |
|
|
try { |
|
@@ -1093,12 +1093,12 @@ public class SQLExec extends JDBCTask { |
|
|
warning = warning.getNextWarning(); |
|
|
warning = warning.getNextWarning(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
if (treatWarningsAsErrors && initialWarning != null) { |
|
|
|
|
|
throw initialWarning; |
|
|
|
|
|
} |
|
|
|
|
|
if (initialWarning != null) { |
|
|
if (initialWarning != null) { |
|
|
setWarningProperty(); |
|
|
setWarningProperty(); |
|
|
} |
|
|
} |
|
|
|
|
|
if (treatWarningsAsErrors && initialWarning != null) { |
|
|
|
|
|
throw initialWarning; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected final void setErrorProperty() { |
|
|
protected final void setErrorProperty() { |
|
|