Skip to content

Commit 45a80fa

Browse files
committed
Polish Javadoc for ScriptStatementFailedException.buildErrorMessage()
Issue: SPR-12752
1 parent 2b34094 commit 45a80fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ public ScriptStatementFailedException(String statement, int statementNumber, Enc
4242
}
4343

4444
/**
45-
* Build an error message based on the supplied parameters.
45+
* Build an error message for an SQL script execution failure, based on
46+
* the supplied arguments.
4647
* @param statement the actual SQL statement that failed
4748
* @param statementNumber the statement number in the SQL script (i.e.,
48-
* the nth statement present in the resource)
49+
* the n<sup>th</sup> statement present in the resource)
4950
* @param encodedResource the resource from which the SQL statement was read
51+
* @return an error message suitable for an exception's <em>detail message</em>
52+
* or logging
53+
* @since 4.2
5054
*/
5155
public static String buildErrorMessage(String statement, int statementNumber, EncodedResource encodedResource) {
5256
return String.format("Failed to execute SQL script statement #%s of %s: %s",

0 commit comments

Comments
 (0)