Class CloseException

  • All Implemented Interfaces:
    java.io.Serializable, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap

    public class CloseException
    extends java.io.IOException
    implements org.refcodes.exception.Trap
    Thrown in case closing an open line (connection, junction, link) caused problems. Usually a method similar to 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).

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CloseException.CloseRuntimeException
      Unchecked exception with the same semantics as the CloseException.
      • Nested classes/interfaces inherited from interface org.refcodes.exception.ErrorCodeAccessor

        org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B extends org.refcodes.exception.ErrorCodeAccessor.ErrorCodeBuilder<B>>, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeMutator, org.refcodes.exception.ErrorCodeAccessor.ErrorCodeProperty
    • Constructor Summary

      Constructors 
      Constructor Description
      CloseException​(java.lang.String message)
      Instantiates a new close exception.
      CloseException​(java.lang.String aMessage, java.lang.String aErrorCode)
      Instantiates a new close exception.
      CloseException​(java.lang.String message, java.lang.Throwable cause)
      Instantiates a new close exception.
      CloseException​(java.lang.String aMessage, java.lang.Throwable aCause, java.lang.String aErrorCode)
      Instantiates a new close exception.
      CloseException​(java.lang.Throwable cause)
      Instantiates a new close exception.
      CloseException​(java.lang.Throwable aCause, java.lang.String aErrorCode)
      Instantiates a new close exception.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrorCode()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
    • Constructor Detail

      • CloseException

        public CloseException​(java.lang.String aMessage,
                              java.lang.String aErrorCode)
        Instantiates a new close exception.
        Parameters:
        aMessage - the message
        aErrorCode - the error code
      • CloseException

        public CloseException​(java.lang.String aMessage,
                              java.lang.Throwable aCause,
                              java.lang.String aErrorCode)
        Instantiates a new close exception.
        Parameters:
        aMessage - the message
        aCause - the cause
        aErrorCode - the error code
      • CloseException

        public CloseException​(java.lang.String message,
                              java.lang.Throwable cause)
        Instantiates a new close exception.
        Parameters:
        message - the message
        cause - the cause
      • CloseException

        public CloseException​(java.lang.String message)
        Instantiates a new close exception.
        Parameters:
        message - the message
      • CloseException

        public CloseException​(java.lang.Throwable aCause,
                              java.lang.String aErrorCode)
        Instantiates a new close exception.
        Parameters:
        aCause - the cause
        aErrorCode - the error code
      • CloseException

        public CloseException​(java.lang.Throwable cause)
        Instantiates a new close exception.
        Parameters:
        cause - the cause
    • Method Detail

      • getErrorCode

        public java.lang.String getErrorCode()
        Specified by:
        getErrorCode in interface org.refcodes.exception.ErrorCodeAccessor