public class AS400JDBCSQLSyntaxErrorException
extends java.sql.SQLException
The AS400JDBCSQLSyntaxErrorException class provides additional information about SQL Syntax Errors thrown by the database. In particular, the method getPositionOfSyntaxError returns the position, if available, of where the syntax error occurred in the original SQL statement. The exception also includes the original SQL statement that encountered the error.
Constructor and Description |
---|
AS400JDBCSQLSyntaxErrorException(int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
java.lang.String SQLState,
int vendorCode,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and vendorCode.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
java.lang.String SQLState,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and SQLState.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
java.lang.String sqlState,
int vendorCode,
java.lang.Throwable cause,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState, vendorCode and cause.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
java.lang.String sqlState,
java.lang.Throwable cause,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason, SQLState and cause.
|
AS400JDBCSQLSyntaxErrorException(java.lang.String reason,
java.lang.Throwable cause,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given reason and cause.
|
AS400JDBCSQLSyntaxErrorException(java.lang.Throwable cause,
int locationOfSyntaxError,
java.lang.String sqlStatementText)
Constructs a AS400JDBCSQLSyntaxErrorException object with a given cause.
|
Modifier and Type | Method and Description |
---|---|
int |
getLocationOfSyntaxError()
returns the location of the syntax error, if available.
|
java.lang.String |
getMessage() |
java.lang.String |
getSqlStatementText()
returns the sql statement text which encountered the error, if available.
|
getErrorCode, getNextException, getSQLState, iterator, setNextException
public AS400JDBCSQLSyntaxErrorException(int locationOfSyntaxError, java.lang.String sqlStatementText)
locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String SQLState, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- SQLState
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String SQLState, int vendorCode, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- SQLState
- vendorCode
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String sqlState, int vendorCode, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- sqlState
- vendorCode
- cause
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.String sqlState, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- sqlState
- cause
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.String reason, java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
reason
- cause
- locationOfSyntaxError
- sqlStatementText
- public AS400JDBCSQLSyntaxErrorException(java.lang.Throwable cause, int locationOfSyntaxError, java.lang.String sqlStatementText)
cause
- locationOfSyntaxError
- sqlStatementText
- public int getLocationOfSyntaxError()
public java.lang.String getSqlStatementText()
public java.lang.String getMessage()
getMessage
in class java.lang.Throwable