Class CloseException

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


    public class CloseException
    extends 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
    • Constructor Detail

      • CloseException

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

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

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

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

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

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

      • getErrorCode

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