Browse Source

Polish Javadoc for ScriptStatementFailedException.buildErrorMessage()

Issue: SPR-12752
pull/752/head
Sam Brannen 10 years ago
parent
commit
45a80fa3ed
  1. 8
      spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java

8
spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java

@ -42,11 +42,15 @@ public class ScriptStatementFailedException extends ScriptException { @@ -42,11 +42,15 @@ public class ScriptStatementFailedException extends ScriptException {
}
/**
* Build an error message based on the supplied parameters.
* 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.,
* the nth statement present in the resource)
* 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) {
return String.format("Failed to execute SQL script statement #%s of %s: %s",

Loading…
Cancel
Save