|
From: McDonald, B. <Bru...@ba...> - 2003-08-27 19:34:50
|
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.
I noticed that default error handler is hardcoded and configuration option
in service factory is ignored. Now the problem is how we can guarantee that
some error handler would be returned from getErrorHandler() method? Maybe we
should just throw an exception in case default error handler could not be
obtained. The problem is that this is not something that user would notice
when start babeldoc. It could take a lot of time untill first error occures.
This would mean that user woudn't be aware that configuration is wrong until
first error occued.
The other option that could be possible is that getErrorHandler would first
try to get error handler configured for that stage, then it should try to
obtain default error handler configured in service file, and in case that
fail it should return DefaultPipelineStageErrorHanlder class. This also
could be bad solution since user might think that it is all right, even if
he has not configured PipelineStageErrorHandler.default correctly.
Ken, do you have some ideas how to improve this code furhter? I don't like
it right now, it looks pretty complicated...
Dejan
----- Original Message -----
From: "Ken Geis" <kg...@sp...>
To: <bab...@li...>
Sent: Tuesday, August 26, 2003 3:34 AM
Subject: [Babeldoc-devel] Setting the error handler
> The docs say
>
> > If you want to have some other error handler you can do it by writing
> > your own error handler class. Your class should implement the
> > interface com.babeldoc.core.pipeline.IPipelineStageErrorHandler. You
> > will also need to provide your new error handler Java class to the
> > pipeline configuration.
>
> That last sentence needs to be expanded. It took looking at the code
> for me to figure it out.
>
> So looking at the PipelineStage code, I would need to set errorHandler
> on each pipeline stage in order to override the default error handler.
> I'd like to be able to change one setting and have it be the default
> error handler. Right now, there is an entry in the core
> service/query.properties
>
>
PipelineStageErrorHandler.default=com.babeldoc.core.pipeline.DefaultPipeline
StageErrorHandler
>
> It looks like this setting is ignored (see
PipelineStage.getErrorHandler().)
>
> Am I missing something? How do I do this? Is there some code that
> needs to get written? I'm glad to do it.
>
>
> Ken
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click
here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Babeldoc-devel mailing list
Bab...@li...
https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|