|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception oracle.javatools.db.DBException oracle.javatools.db.sql.SQLQueryException oracle.javatools.db.sql.InvalidSQLException
public class InvalidSQLException
SQLQueryException for representing errors in the sql (e.g. those that are syntax related). Also used to represent errors in sql run against the database.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
|
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). |
Methods inherited from class oracle.javatools.db.DBException |
---|
getNextException, getObject, setNextException |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 atMethod Detail |
---|
public 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()
getMessage
in class java.lang.Throwable
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |