Refer to statement numbers in ScriptStatementFailedException
ScriptStatementFailedException now properly refers to statement numbers instead of line numbers. Issue: SPR-12752
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -32,12 +32,13 @@ public class ScriptStatementFailedException extends ScriptException {
|
||||
/**
|
||||
* Construct a new {@code ScriptStatementFailedException}.
|
||||
* @param statement the actual SQL statement that failed
|
||||
* @param lineNumber the line number in the SQL script
|
||||
* @param statementNumber 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 lineNumber, EncodedResource resource, Throwable cause) {
|
||||
super("Failed to execute SQL script statement at line " + lineNumber + " of resource " + resource + ": "
|
||||
public ScriptStatementFailedException(String statement, int statementNumber, EncodedResource resource, Throwable cause) {
|
||||
super("Failed to execute SQL script statement #" + statementNumber + " of resource " + resource + ": "
|
||||
+ statement, cause);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user