Module de.carne

Class FunctionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class FunctionException
    extends java.lang.RuntimeException
    RuntimeException type used to handle exception during execution of a functional interface.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends java.lang.Exception>
      T
      rethrow​(java.lang.Class<T> exceptionType)
      Gets the wrapped exception for re-throwing.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FunctionException

        public FunctionException​(java.lang.Exception cause)
        Constructs a new FunctionException instance.
        Parameters:
        cause - the exception to wrap.
    • Method Detail

      • rethrow

        public <T extends java.lang.Exception> T rethrow​(java.lang.Class<T> exceptionType)
        Gets the wrapped exception for re-throwing.
        Type Parameters:
        T - the wrapped excption's type.
        Parameters:
        exceptionType - the wrapped exception type.
        Returns:
        the wrapped exception.