Serializable
, org.refcodes.exception.ErrorCodeAccessor
, org.refcodes.exception.Trap
public class CloseException extends IOException implements org.refcodes.exception.Trap
Closable.close()
throws such an
exception.
ATTENTION: This Exception
does not provide a dedicated
ConnectionAccessor
as a LinkComponent
does not necessary
provide dedicated connection information, it may be hard wired to another
software system's hot spot or similar with the option of opening or closing.
In order to provide compatibility with the Java APIs, this exception extends
the IOException
. E.g. JAVA APIs throw an IOException
upon
close, the Closable
mixin throws an exception CloseException
upon failure which can be assigned to an IOException
reference (e.g.
caught as an IOException
).
Modifier and Type | Class | Description |
---|---|---|
static class |
CloseException.CloseRuntimeException |
Unchecked exception with the same semantics as the
CloseException . |
org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B extends org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B>>, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeMutator, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeProperty
Constructor | Description |
---|---|
CloseException(String message) |
Instantiates a new close exception.
|
CloseException(String aMessage,
String aErrorCode) |
Instantiates a new close exception.
|
CloseException(String message,
Throwable cause) |
Instantiates a new close exception.
|
CloseException(String aMessage,
Throwable aCause,
String aErrorCode) |
Instantiates a new close exception.
|
CloseException(Throwable cause) |
Instantiates a new close exception.
|
CloseException(Throwable aCause,
String aErrorCode) |
Instantiates a new close exception.
|
Modifier and Type | Method | Description |
---|---|---|
String |
getErrorCode() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public CloseException(String aMessage, String aErrorCode)
aMessage
- the messageaErrorCode
- the error codepublic CloseException(String aMessage, Throwable aCause, String aErrorCode)
aMessage
- the messageaCause
- the causeaErrorCode
- the error codepublic CloseException(String message, Throwable cause)
message
- the messagecause
- the causepublic CloseException(String message)
message
- the messagepublic CloseException(Throwable aCause, String aErrorCode)
aCause
- the causeaErrorCode
- the error codepublic CloseException(Throwable cause)
cause
- the causepublic String getErrorCode()
getErrorCode
in interface org.refcodes.exception.ErrorCodeAccessor
Copyright © 2018. All rights reserved.