public class InvalidSQLException extends SQLQueryException
Constructor and Description |
---|
InvalidSQLException(java.lang.String sql, java.lang.String message)
Creates a new exception for the given sql.
|
InvalidSQLException(java.lang.String sql, java.lang.String message, java.lang.Integer offset)
Creates a new exception for the given sql.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getColumnNumber()
Gets the column (char) number in the current line that the error occured at.
|
java.lang.Integer |
getLineNumber()
Gets the line number in the sql that the error occured at.
|
java.lang.String |
getMessage()
Gets the message for this exception.
|
java.lang.Integer |
getOffset()
Gets the offset that the first error occurs at in the sql.
|
java.lang.String |
getSQL()
Gets the invalid sql.
|
java.lang.String |
getSQLWithError()
Gets the query with the error offset highlighted (if the offset is known).
|
append, getAllMessages, getNextException, getObject, getRelatedObjects, setNextException, setRelatedObjects
public InvalidSQLException(java.lang.String sql, java.lang.String message)
sql
- the sql that is invalidmessage
- the error messagepublic InvalidSQLException(java.lang.String sql, java.lang.String message, java.lang.Integer offset)
sql
- the sql that is invalidmessage
- the error messageoffset
- the offset in the sql that the error is atpublic java.lang.String getSQL()
public java.lang.Integer getOffset()
public java.lang.Integer getLineNumber()
public java.lang.Integer getColumnNumber()
public java.lang.String getSQLWithError()
For example:
select * frm employees ^
public java.lang.String getMessage()
DBException
getAllMessages()
getMessage
in class DBException
DBException.getAllMessages()