Class PredicateExceptionHandler

java.lang.Object
kos.core.exception.PredicateExceptionHandler
All Implemented Interfaces:
ExceptionHandler

public class PredicateExceptionHandler extends Object implements ExceptionHandler
The default Exception Handler mechanism. It provides predicate-based semantics for Exception Handler matching.
  • Field Details

    • predicatesAndHandlers

      @NonNull final @NonNull List<PredicateExceptionHandler.PredicateAndHandler> predicatesAndHandlers
      This is a naive implementation, which the performance degrades linearly as the number of predicates grows. It might not be a problem as exceptions shouldn't be the preferred request path, thus not impacting the user experience that much.
  • Constructor Details

    • PredicateExceptionHandler

      public PredicateExceptionHandler()
      Constructs this class with an empty, but mutable, list of predicates.
  • Method Details