Interface Exceptional


  • public interface Exceptional
    An extension of the IProblem interface for problems that extend Exception. Since Exception is a concrete type any class can only extend one exception type. ProblemRuntime is one choice, but we don't want to force people to extend from this but choose their own super class. For this they can implement this interface and get the same handling as ProblemRuntime for free. A common use case would be:
    
     public final class OutOfStockException extends BusinessException implements Exceptional
     
    See Also:
    Exception, IProblem, ProblemRuntime
    • Method Detail

      • propagate

        default java.lang.Exception propagate()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • propagateAs

        default <X extends java.lang.Throwable> X propagateAs​(java.lang.Class<X> type)
                                                       throws X extends java.lang.Throwable
        Throws:
        X extends java.lang.Throwable