Interface ExceptionChainer<Z extends java.lang.Throwable>

  • Type Parameters:
    Z - Throwable type

    public interface ExceptionChainer<Z extends java.lang.Throwable>
    Chains an exception to desired type. For example:

     ExceptionChainer<SomeException> chainer = new ExceptionChainer<SomeException>()
     {
         public SomeException chain(Throwable t)
         {
             if (t instanceof SomeException)
                 return (SomeException) t;
             else
                 return new SomeException(t);
         }
     };
     
    • Method Summary

      Modifier and Type Method Description
      Z chain​(java.lang.Throwable t)  
    • Method Detail

      • chain

        Z chain​(java.lang.Throwable t)