Class ExceptionManager

java.lang.Object
com.dianxin.tori.base.lifecycle.ExceptionManager

@Experimental public class ExceptionManager extends Object
  • Constructor Details

    • ExceptionManager

      public ExceptionManager()
  • Method Details

    • register

      public <E extends Throwable, C> void register(Class<E> exceptionClass, BotExceptionHandler<E,C> handler)
      Register a handler for a specific Exception type.
    • dispatch

      public <C> void dispatch(Throwable exception, C context)
      Coordinate the error to its correct handler.