Pass exceptions thrown by user-provided MatchProcessors
back to the user in the form of a new unchecked exception type, MatchProcessorException
.
If a MatchProcessor
throws an unchecked exception, scanning continues and MatchProcessors
are still called for other matches that are found. However, all exceptions thrown by MatchProcessors
are packaged up as a list inside a MatchProcessorException
, and the MatchProcessorException
is thrown as an unchecked exception at the end of the scan. If necessary, the individual exceptions that were thrown by MatchProcessors
may be fetched using MatchProcessorException#getExceptions()
. (If calling FastClasspathScanner#scanAsync()
rather than FastClasspathScanner#scan()
, the MatchProcessorException
will be wrapped in an ExecutionException
when calling Future<ScanResult>#get()
on the returned Future
.) Individual exceptions thrown by MatchProcessors
are also logged during the scanning process, and may be viewed by calling FastClasspathScanner#verbose()
before #scan()
.