Package com.mysql.cj.exceptions
Class CJException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.mysql.cj.exceptions.CJException
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AssertionFailedException
,CJCommunicationsException
,CJOperationNotSupportedException
,CJPacketTooBigException
,CJTimeoutException
,ClosedOnExpiredPasswordException
,ConnectionIsClosedException
,DataReadException
,DataTruncationException
,FeatureNotAvailableException
,InvalidConnectionAttributeException
,OperationCancelledException
,PasswordExpiredException
,PropertyNotModifiableException
,RSAException
,SSLParamsException
,StatementIsClosedException
,UnableToConnectException
,UnsupportedConnectionStringException
,WrongArgumentException
,XDevAPIError
,XProtocolError
public class CJException
extends java.lang.RuntimeException
The base unchecked exception thrown internally in connector.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
exceptionMessage
We can't override theThrowable.detailMessage
directly because it has a private accessibility, thus for that need we use this protected variable and overridegetMessage()
-
Constructor Summary
Constructors Modifier Constructor Description CJException()
CJException(java.lang.String message)
CJException(java.lang.String message, java.lang.Throwable cause)
protected
CJException(java.lang.String message, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)
CJException(java.lang.Throwable cause)
-
Method Summary
Modifier and Type Method Description void
appendMessage(java.lang.String messageToAppend)
java.lang.String
getMessage()
java.lang.String
getSQLState()
int
getVendorCode()
boolean
isTransient()
void
setSQLState(java.lang.String sQLState)
void
setTransient(boolean isTransient)
void
setVendorCode(int vendorCode)
-
Field Details
-
exceptionMessage
protected java.lang.String exceptionMessageWe can't override theThrowable.detailMessage
directly because it has a private accessibility, thus for that need we use this protected variable and overridegetMessage()
-
-
Constructor Details
-
CJException
public CJException() -
CJException
public CJException(java.lang.String message) -
CJException
public CJException(java.lang.Throwable cause) -
CJException
public CJException(java.lang.String message, java.lang.Throwable cause) -
CJException
protected CJException(java.lang.String message, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)
-
-
Method Details
-
getSQLState
public java.lang.String getSQLState() -
setSQLState
public void setSQLState(java.lang.String sQLState) -
getVendorCode
public int getVendorCode() -
setVendorCode
public void setVendorCode(int vendorCode) -
isTransient
public boolean isTransient() -
setTransient
public void setTransient(boolean isTransient) -
getMessage
public java.lang.String getMessage()- Overrides:
getMessage
in classjava.lang.Throwable
-
appendMessage
public void appendMessage(java.lang.String messageToAppend)
-