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.StringexceptionMessageWe can't override theThrowable.detailMessagedirectly 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)protectedCJException(java.lang.String message, java.lang.Throwable cause, boolean enableSuppression, boolean writableStackTrace)CJException(java.lang.Throwable cause) -
Method Summary
Modifier and Type Method Description voidappendMessage(java.lang.String messageToAppend)java.lang.StringgetMessage()java.lang.StringgetSQLState()intgetVendorCode()booleanisTransient()voidsetSQLState(java.lang.String sQLState)voidsetTransient(boolean isTransient)voidsetVendorCode(int vendorCode)
-
Field Details
-
exceptionMessage
protected java.lang.String exceptionMessageWe can't override theThrowable.detailMessagedirectly 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:
getMessagein classjava.lang.Throwable
-
appendMessage
public void appendMessage(java.lang.String messageToAppend)
-