The attached patch shows a bug in the DefaultExceptionPolicyStrategy or the way ExceptionPolicys are added to a RouteBuilder's errorhandler.
In ContextScopedOnExceptionMultipleRouteBuildersReverseTest, the ordering of the routes causes the onException(IllegalArgumentException.class) to added to the ExceptionProcessors for the direct:foo-RouteBuilder. When the route is run, the OnExceptionDefinition matches exactly on the exception-type, despite this OnExceptionDefiniton being registered on a different RouteBuilder. As far as we can tell, the processor is later ignored because it's identified as being from a different route-context.
We have attached corresponding tests for camel-spring that show that the issue is tied to alphabetical ordering of RouteBuilders when using contextscan.