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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator