public class QueryException extends Exception
Constructor and Description |
---|
QueryException(String message)
Creates a default query exception with errorCode -1 and sqlState HY0000.
|
QueryException(String message,
ExceptionCode exceptionCode)
Creates a query exception with a message.
|
QueryException(String message,
int errorCode,
String sqlState)
Creates a query exception with a message.
|
QueryException(String message,
int errorCode,
String sqlState,
Throwable cause)
Creates a query exception with a message and a cause.
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
returns the error code.
|
String |
getMessage() |
String |
getSqlState()
Gets the sql state.
|
void |
setMessage(String message) |
void |
setSqlState(String sqlState)
Sets the sql state.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public QueryException(String message)
message
- the message to setpublic QueryException(String message, int errorCode, String sqlState)
message
- the messageerrorCode
- the error codesqlState
- the sqlstatepublic QueryException(String message, ExceptionCode exceptionCode)
message
- the messageexceptionCode
- exceptionCodepublic String getMessage()
getMessage
in class Throwable
public void setMessage(String message)
public final int getErrorCode()
public final String getSqlState()
public void setSqlState(String sqlState)
sqlState
- sqlStateCopyright © 2016. All rights reserved.