Class OpenException

  • All Implemented Interfaces:
    Serializable, org.refcodes.exception.ErrorCodeAccessor, org.refcodes.exception.Trap
    Direct Known Subclasses:
    OpenTimeoutException


    public class OpenException
    extends IOException
    implements org.refcodes.exception.Trap
    Thrown in case opening or accessing an open line (connection, junction, link) caused problems. Usually a method similar to Openable.open() 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 OpenException upon failure which can be assigned to an IOException reference (e.g. caught as an IOException).

    See Also:
    Serialized Form
    • Constructor Detail

      • OpenException

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

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

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

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

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

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

      • getErrorCode

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