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

public Class CommunicationsException

extends SQLRecoverableException
implements StreamingNotifiable
Class Inheritance
All Implemented Interfaces
com.mysql.cj.exceptions.StreamingNotifiable
Known Direct Subclasses
com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException
Imports
java.sql.SQLRecoverableException, com.mysql.cj.Messages, com.mysql.cj.exceptions.ExceptionFactory, .MysqlErrorNumbers, .StreamingNotifiable, com.mysql.cj.jdbc.JdbcConnection, com.mysql.cj.protocol.PacketReceivedTimeHolder, .PacketSentTimeHolder

An exception to represent communications errors with the database. Attempts to provide 'friendlier' error messages to end-users, including the last time a packet was sent to the database, what the client-timeout is set to, and whether the idle time has been exceeded.

Field Summary

Modifier and TypeField and Description
private String
private static final long

Constructor Summary

AccessConstructor and Description
public
CommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, Exception underlyingException)

public
CommunicationsException(String message, Throwable underlyingException)

Method Summary

Modifier and TypeMethod and Description
public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string of this throwable.

public String
getSQLState()

Overrides java.sql.SQLException.getSQLState.

Retrieves the SQLState for this SQLException object.

public void

Field Detail

exceptionMessageback to summary
private String exceptionMessage
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.sql.SQLRecoverableException.serialVersionUID.

Constructor Detail

CommunicationsExceptionback to summary
public CommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, Exception underlyingException)
CommunicationsExceptionback to summary
public CommunicationsException(String message, Throwable underlyingException)

Method Detail

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()

Overrides java.sql.SQLException.getSQLState.

Doc from java.sql.SQLException.getSQLState.

Retrieves the SQLState for this SQLException object.

Returns:String

the SQLState value

Annotations
@Override
setWasStreamingResultsback to summary
public void setWasStreamingResults()

Implements com.mysql.cj.exceptions.StreamingNotifiable.setWasStreamingResults.

Annotations
@Override