Package 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
Modifier and TypeMethodDescriptionbooleanaccept(ExecutionErrorContext errorContext) default <T> Tfilter(ExecutionErrorContext errorContext) Based on the cause filters the actual error and produces ExecutionError instance if applicable for given filter.Returns expected priority in regards to other filters.default booleanisCausedBy(Throwable throwable, Class<?>... types)
-
Method Details
-
accept
-
filter
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
-
extract
-