diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java
index 09cef9f079..224973bf80 100644
--- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java
+++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/ScriptStatementFailedException.java
@@ -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 nth 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 detail message
+ * 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",