The default strategy used in Camel to resolve the {@link org.apache.camel.model.ExceptionType} that shouldhandle the thrown exception.
Selection strategy: This strategy applies the following rules:
- Will walk the exception hieracy from bottom upwards till the thrown exception, meaning that the most outer caused by is selected first, ending with the thrown exception itself
- The exception type must be configured with an Exception that is an instance of the thrown exception, this is tested using the {@link #filter(org.apache.camel.model.ExceptionType,Class,Throwable)} method.
- If the exception type has exactly the thrown exception then its selected as its an exact match
- Otherwise the type that has an exception that is the closests super of the thrown exception is selected (recurring up the exception hierarchy)
Fine grained matching: If the {@link ExceptionType} has a when defined with an expression the type is also matches againstthe current exchange using the {@link #matchesWhen(org.apache.camel.model.ExceptionType,org.apache.camel.Exchange)}method. This can be used to for more fine grained matching, so you can e.g. define multiple sets of exception types with the same exception class(es) but have a predicate attached to select which to select at runtime.