类 ScriptStatementFailedException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.dao.DataAccessException
- org.springframework.jdbc.datasource.init.ScriptException
- org.springframework.jdbc.datasource.init.ScriptStatementFailedException
- 所有已实现的接口:
Serializable
public class ScriptStatementFailedException extends ScriptException
Thrown byScriptUtils
if a statement in an SQL script failed when executing it against the target database.- 从以下版本开始:
- 3.0.5
- 作者:
- Juergen Hoeller, Sam Brannen
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 ScriptStatementFailedException(String stmt, int stmtNumber, EncodedResource encodedResource, Throwable cause)
Construct a newScriptStatementFailedException
.
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static String
buildErrorMessage(String stmt, int stmtNumber, EncodedResource encodedResource)
Build an error message for an SQL script execution failure, based on the supplied arguments.从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
构造器详细资料
ScriptStatementFailedException
public ScriptStatementFailedException(String stmt, int stmtNumber, EncodedResource encodedResource, Throwable cause)
Construct a newScriptStatementFailedException
.- 参数:
stmt
- the actual SQL statement that failedstmtNumber
- the statement number in the SQL script (i.e., the nth statement present in the resource)encodedResource
- the resource from which the SQL statement was readcause
- the underlying cause of the failure
方法详细资料
buildErrorMessage
public static String buildErrorMessage(String stmt, int stmtNumber, EncodedResource encodedResource)
Build an error message for an SQL script execution failure, based on the supplied arguments.- 参数:
stmt
- the actual SQL statement that failedstmtNumber
- the statement number in the SQL script (i.e., the nth statement present in the resource)encodedResource
- the resource from which the SQL statement was read- 返回:
- an error message suitable for an exception's detail message or logging
- 从以下版本开始:
- 4.2