Class CollectingExceptionCallback<EXTYPE extends Throwable>

java.lang.Object
com.helger.base.callback.exception.CollectingExceptionCallback<EXTYPE>
Type Parameters:
EXTYPE - The exception type to be handled
All Implemented Interfaces:
IExceptionCallback<EXTYPE>, ICallback

@NotThreadSafe public class CollectingExceptionCallback<EXTYPE extends Throwable> extends Object implements IExceptionCallback<EXTYPE>
A specific implementation of the IExceptionCallback interface, that stores the last exception.
Author:
Philip Helger
  • Constructor Details

    • CollectingExceptionCallback

      public CollectingExceptionCallback()
  • Method Details

    • onException

      public void onException(@Nullable EXTYPE aEx)
      Description copied from interface: IExceptionCallback
      Called when an exception of the specified type occurred. You may not re-throw the exception from in here!
      Specified by:
      onException in interface IExceptionCallback<EXTYPE extends Throwable>
      Parameters:
      aEx - The exception. Never null.
    • hasException

      public boolean hasException()
    • getException

      @Nullable public EXTYPE getException()
    • toString

      public String toString()
      Overrides:
      toString in class Object