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.StringgetMessage()java.lang.StringgetSQLState()voidsetWasStreamingResults()Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, iterator, setNextExceptionMethods 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:
getMessagein classjava.lang.Throwable
-
getSQLState
public java.lang.String getSQLState()- Overrides:
getSQLStatein classjava.sql.SQLException
-
setWasStreamingResults
public void setWasStreamingResults()- Specified by:
setWasStreamingResultsin interfaceStreamingNotifiable
-