This is probably a bit of a religious question, but should we:
a) Define user defined exception types for internal interfaces such as PersistenceManager,
e.g. PersistenceException and declare methods on PersistenceManager to "throw
PersistenceException"
b) Screw user defined exception types and declare internal interface methods as
"throws Exception" - this may result in a method on PersistenceManager throwing
a SQLException or a FileNotFoundExcepton for example.
If we choose a) Then we need to catch other exceptions (e.g. SQLException) internally and
rethrow as PersistenceException - this will involve extra messy code.
If we choose b) Then exceptions get propagated up until they can be handled somwehere -
but we end up with practically every method being declared as "throws Exception"
- is this right?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961230#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...