Fixed javadoc warnings and revised FastByteArrayOutputStream code style
This commit is contained in:
@@ -31,30 +31,30 @@ public class ScriptStatementFailedException extends ScriptException {
|
||||
|
||||
/**
|
||||
* Construct a new {@code ScriptStatementFailedException}.
|
||||
* @param statement the actual SQL statement that failed
|
||||
* @param statementNumber the statement number in the SQL script (i.e.,
|
||||
* @param stmt the actual SQL statement that failed
|
||||
* @param stmtNumber the statement number in the SQL script (i.e.,
|
||||
* the nth statement present in the resource)
|
||||
* @param resource the resource from which the SQL statement was read
|
||||
* @param cause the underlying cause of the failure
|
||||
*/
|
||||
public ScriptStatementFailedException(String statement, int statementNumber, EncodedResource resource, Throwable cause) {
|
||||
super(buildErrorMessage(statement, statementNumber, resource), cause);
|
||||
public ScriptStatementFailedException(String stmt, int stmtNumber, EncodedResource resource, Throwable cause) {
|
||||
super(buildErrorMessage(stmt, stmtNumber, resource), cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build an error message for an SQL script execution failure, based on
|
||||
* the supplied arguments.
|
||||
* @param statement the actual SQL statement that failed
|
||||
* @param statementNumber the statement number in the SQL script (i.e.,
|
||||
* Build an error message for an SQL script execution failure,
|
||||
* based on the supplied arguments.
|
||||
* @param stmt the actual SQL statement that failed
|
||||
* @param stmtNumber the statement number in the SQL script (i.e.,
|
||||
* the n<sup>th</sup> statement present in the resource)
|
||||
* @param encodedResource the resource from which the SQL statement was read
|
||||
* @return an error message suitable for an exception's <em>detail message</em>
|
||||
* or logging
|
||||
* @since 4.2
|
||||
*/
|
||||
public static String buildErrorMessage(String statement, int statementNumber, EncodedResource encodedResource) {
|
||||
public static String buildErrorMessage(String stmt, int stmtNumber, EncodedResource encodedResource) {
|
||||
return String.format("Failed to execute SQL script statement #%s of %s: %s",
|
||||
statementNumber, encodedResource, statement);
|
||||
stmtNumber, encodedResource, stmt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user