Package com.mysql.cj.jdbc.exceptions
Class CommunicationsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.sql.SQLException
java.sql.SQLRecoverableException
com.mysql.cj.jdbc.exceptions.CommunicationsException
- All Implemented Interfaces:
StreamingNotifiable
,java.io.Serializable
,java.lang.Iterable<java.lang.Throwable>
- Direct Known Subclasses:
ConnectionFeatureNotAvailableException
public class CommunicationsException extends java.sql.SQLRecoverableException implements StreamingNotifiable
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.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, java.lang.Exception underlyingException)
CommunicationsException(java.lang.String message, java.lang.Throwable underlyingException)
-
Method Summary
Modifier and Type Method Description java.lang.String
getMessage()
java.lang.String
getSQLState()
void
setWasStreamingResults()
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, iterator, setNextException
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommunicationsException
public CommunicationsException(JdbcConnection conn, PacketSentTimeHolder packetSentTimeHolder, PacketReceivedTimeHolder packetReceivedTimeHolder, java.lang.Exception underlyingException) -
CommunicationsException
public CommunicationsException(java.lang.String message, java.lang.Throwable underlyingException)
-
-
Method Details
-
getMessage
public java.lang.String getMessage()- Overrides:
getMessage
in classjava.lang.Throwable
-
getSQLState
public java.lang.String getSQLState()- Overrides:
getSQLState
in classjava.sql.SQLException
-
setWasStreamingResults
public void setWasStreamingResults()- Specified by:
setWasStreamingResults
in interfaceStreamingNotifiable
-