Package org.omegazero.net.common
Class UnhandledException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.omegazero.net.common.UnhandledException
- All Implemented Interfaces:
Serializable
Wraps any
Throwable
in this unchecked exception, accessible using Throwable.getCause()
.
Thrown by SocketConnection
methods if no onError
handler is set. Note that, usually, classes creating and managing a SocketConnection
will set a
default error handler, which will cause the error handler to be called instead of this exception being thrown.
- Since:
- 1.6
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
If thisUnhandledException
wraps anIOException
, this method throws it; otherwise, it does nothing.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnhandledException
Creates a newUnhandledException
with the givenThrowable
.- Parameters:
e
- TheThrowable
-
-
Method Details
-
rethrowIOException
If thisUnhandledException
wraps anIOException
, this method throws it; otherwise, it does nothing.- Throws:
IOException
- The wrappedIOException
-