Interface ExceptionHandler

    • Method Detail

      • isDeclaredException

        boolean isDeclaredException​(java.lang.Class cls)
        Return true iff cls is an exception class that is assignment compatible with an exception declared on the method used to create this ExceptionHandler.
        Parameters:
        cls - Class to check
        Returns:
        If class is a declared exception
      • writeException

        void writeException​(OutputStream os,
                            java.lang.Exception ex)
        Write the exception ex to os. ex must be assignment compatible with an exception declared on the method used to create this ExceptionHandler.
        Parameters:
        os - Stream to write to.
        ex - Exception to write.
      • readException

        java.lang.Exception readException​(ApplicationException ae)
        Read the exception contained in the InputStream in the ApplicationException. If ae represents an exception that is assignment compatible with an exception on the method used to create this exception handler, return the exception, otherwise return an UnexpectedException wrapping the exception in ae.
        Parameters:
        ae - Exception to get input stream to read exception from.
        Returns:
        Exception from from stream.