|
From: Ken G. <kg...@sp...> - 2003-08-27 20:00:33
|
I don't think the code looks too complicated. I think that instead of
return new DefaultPipelineStageErrorHandler();
we should just have
try {
return (IPipelineStageErrorHandler)
ServiceFactory.getService("PipelineStageErrorHandler.default");
} catch (ServiceException se) {
throw new PipelineException(se.getMessage(), se);
}
If that service is not defined, that is an error in the configuration.
It's already defined in service/query.properties.
It works for me!
------------------------------------------------------
I second that - if you have some ideas about how we can make the error
handling configurable - it would be most appreciated.
-----Original Message-----
From: Dejan Krsmanovic [mailto:dej...@nb...]
Sent: Tuesday, August 26, 2003 3:38 AM
To: Babeldoc Developer List
Subject: Re: [Babeldoc-devel] Setting the error handler
I guess you are right that DefaultErrorHandler is ignored. IMO, the
execution should look like this:
- in case of error try to get error handler:
-if there is error handler configured for this stage return it
-if no error handler configured for this stage try to return default
error handler
- error handler shoud try to handle this error
- if error handler returns true, continue with processing. Otherwise, if
error stage is configured for particular stage, it should be processed next.
... snip ...
Ken, do you have some ideas how to improve this code furhter? I don't like
it right now, it looks pretty complicated...
|