Interface ExecutionErrorFilter


  • public interface ExecutionErrorFilter
    Responsible for implementing filter capability to decide how to deal with given error. Up to concrete implementations to decide on logic how to read details from the cause. It might simply check on the top level exception or it can drill down into bottom of the cause.
    • Method Detail

      • filter

        ExecutionError filter​(ExecutionErrorContext errorContext)
        Based on the cause filters the actual error and produces ExecutionError instance if applicable for given filter. In case filter is not finding anything relevant it shall return null instead of execution error instance to allow others to process it.
        Parameters:
        cause - the root cause of the error
        Returns:
        ExecutionError instance populated with details extracted from the cause, or null of not applicable to this filter
      • getPriority

        Integer getPriority()
        Returns expected priority in regards to other filters. The lower value returned the higher priority it has.
        Returns:
        priority for processing
      • isCausedBy

        default boolean isCausedBy​(Throwable throwable,
                                   Class<?>... types)
      • extract

        default <T> T extract​(Throwable throwable,
                              Class<T> type)