Bug 4829

Summary: SPEC - add BatchException as common base class
Product: jbatch Reporter: cvignola
Component: sourceAssignee: cvignola
Severity: enhancement CC: issues
Priority: P5    
Version: 1   
Target Milestone: ---   
Hardware: All   
OS: All   

Description cvignola 2013-03-22 16:04:48 UTC

Comment 1 cvignola 2013-03-22 16:06:40 UTC
I noticed BatchOperationsRuntimeException has been removed.  I actually 
find exception like this can be quite useful as an umbrella exception.  
I've seen such general exceptions in other technologies, for example,

JPA has PersistenceException (unchecked exception), extended by all jpa 
EJB has EJBException (unchecked exception), extended by all exceptions 
in EJB.

It's convenient for the client code as a grouping mechanism.

Even if we don't need it right now, it can add some flexibility for 
future enhancement.  For example, this super exception (BatchException) 
can hold some common logic.

Our current exceptions are all very fine-grained, which means various 
vendor-specific exceptions will be created for uncovered error 
conditions (e.g. loopback exception).  I think it will be cleaner if all 
these vendor-specific exceptions voluntarily extend BatchException.