For errors in the typeSystemInit() method of an annotator, annotator writers can throw an AnnotatorConfigurationException or an AnnotatorInitializationException. Since the typeSystemInit() method is called during the annotator process() method if the type system of the CAS has changed, the process() method interface only allows to throw AnalysisEngineProcessExceptions. So in case of AnnotatorConfigurationExceptions or AnnotatorInitializationExceptions thrown by the typeSystemInit() method the UIMA framework wraps these into an AnalysisEngineProcessException.

For applications it is now hard to detect the cause of the error. They ever have to check for underlying exceptions to decide if the error was a document processing error or a configuration/initialization error. I think this is not very intuitive and possibly unexpected by the users that they get an AnalysisEngineProcessException that was caused by an configuration/initialization error.

Is this something that we can fix? For example to allow the UIMA process() method additionally to throw an AnntatorInitializationException? If not, I think we should at least document that behavior.

What do others think?

-- Michael

Reply via email to