org.kie.internal.runtime.error

## 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 Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(ExecutionErrorContext errorContext)`
    `default <T> T` | `extract(Throwable throwable, Class<T> type)`
    `ExecutionError` | `filter(ExecutionErrorContext errorContext)` Based on the cause filters the actual error and produces ExecutionError instance if applicable for given filter.
    `Integer` | `getPriority()` Returns expected priority in regards to other filters.
    `default boolean` | `isCausedBy(Throwable throwable, Class<?>... types)`

- - ### Method Detail

    - #### accept

          boolean accept(ExecutionErrorContext errorContext)

    - #### 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)

Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.