commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kris Nuttycombe" <Kris.Nuttyco...@noaa.gov>
Subject [pipeline] Error handling question
Date Thu, 02 Dec 2004 18:59:37 GMT
Hi, all,

I've got a exception handling policy question for all of you. Here's the 
situation:

In commons-pipeline, one or more child threads may be spawned to control 
processing for a given stage. What should the error handling policy be 
for Errors generated by the foreign method calls? I catch all 
Exceptions, including RuntimeExceptions, and record the faults in a 
monitor object that is visible at the pipeline level. What I don't know 
is whether or not I should try to catch Errors as well. The information 
in the Error object is obviously potentially useful for debugging, but 
it's almost certain that any Errors that occur can't be recovered from 
and ought to abort processing of the whole pipeline.

What should be the default behavior of a parent thread is when a child 
thread dies due to an uncaught Error? Should the policy be to 
immediately interrupt any sibling threads, or does this seem like it 
would make it too easy to leave an external resource modified by a Stage 
in an inconsistent state, and therefore sibling threads should be asked 
to exit gracefully? Maybe the behavior on interruption should be 
something that's set on a stage-by-stage basis?

Thoughts, comments, suggestions?

Kris

-- 
=====================================================
Kris Nuttycombe
Associate Scientist
Geospatial Data Services Group
CIRES, National Geophysical Data Center/NOAA
(303) 497-6337
Kris.Nuttycombe@noaa.gov
=====================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message