Top Description Fields Constructors Methods
com.mysql.cj.exceptions

public Class CJException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
com.mysql.cj.exceptions.CJOperationNotSupportedException, com.mysql.cj.exceptions.CJPacketTooBigException, com.mysql.cj.exceptions.CJTimeoutException, com.mysql.cj.exceptions.ClosedOnExpiredPasswordException, com.mysql.cj.exceptions.ConnectionIsClosedException, com.mysql.cj.exceptions.DataReadException, com.mysql.cj.exceptions.DataTruncationException, com.mysql.cj.exceptions.FeatureNotAvailableException, com.mysql.cj.exceptions.InvalidConnectionAttributeException, com.mysql.cj.exceptions.OperationCancelledException, com.mysql.cj.exceptions.PasswordExpiredException, com.mysql.cj.exceptions.PropertyNotModifiableException, com.mysql.cj.exceptions.RSAException, com.mysql.cj.exceptions.SSLParamsException, com.mysql.cj.exceptions.StatementIsClosedException, com.mysql.cj.exceptions.UnableToConnectException, com.mysql.cj.exceptions.UnsupportedConnectionStringException, com.mysql.cj.exceptions.WrongArgumentException, com.mysql.cj.protocol.x.XProtocolError, com.mysql.cj.xdevapi.XDevAPIError, com.mysql.cj.exceptions.AssertionFailedException, com.mysql.cj.exceptions.CJCommunicationsException

The base unchecked exception thrown internally in connector.

Field Summary

Modifier and TypeField and Description
protected String
exceptionMessage

We can't override the Throwable#detailMessage directly because it has a private accessibility, thus for that need we use this protected variable and override getMessage()

private boolean
private static final long
private String
private int

Constructor Summary

AccessConstructor and Description
public
public
public
public
CJException(String message, Throwable cause)

protected
CJException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)

Method Summary

Modifier and TypeMethod and Description
public void
appendMessage(String messageToAppend)

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

public String
public int
public boolean
public void
setSQLState(String sQLState)

public void
setTransient(boolean isTransient)

public void
setVendorCode(int vendorCode)

Field Detail

exceptionMessageback to summary
protected String exceptionMessage

We can't override the Throwable#detailMessage directly because it has a private accessibility, thus for that need we use this protected variable and override getMessage()

isTransientback to summary
private boolean isTransient
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

SQLStateback to summary
private String SQLState
vendorCodeback to summary
private int vendorCode

Constructor Detail

CJExceptionback to summary
public CJException()
CJExceptionback to summary
public CJException(String message)
CJExceptionback to summary
public CJException(Throwable cause)
CJExceptionback to summary
public CJException(String message, Throwable cause)
CJExceptionback to summary
protected CJException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace)

Method Detail

appendMessageback to summary
public void appendMessage(String messageToAppend)
getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Doc from java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

Returns:String

the detail message string of this Throwable instance (which may be null).

Annotations
@Override
getSQLStateback to summary
public String getSQLState()
getVendorCodeback to summary
public int getVendorCode()
isTransientback to summary
public boolean isTransient()
setSQLStateback to summary
public void setSQLState(String sQLState)
setTransientback to summary
public void setTransient(boolean isTransient)
setVendorCodeback to summary
public void setVendorCode(int vendorCode)