I've a class class_A
dealing with another class class_B
which has methods with calls to other objects dealing with HTTP and JSON. Now I don't wanna handle these exceptions within class_B
but rather on a higher level and thus forward them via throw e
to class_A
.
Now I'm wondering when in my class A
surrounding the call to a method of class_B
with try/catch how I can get all the possible Exceptions that could get forwarded from that method or methods of subclasses (like HTTP & JSON).
Preferred would be way to get the possible Exceptions directly in Eclipse, but other solutions are appreciated as well.
(Please let me know if my problem description is not clear.)
Update: What I'm looking for is not an actual implementation, but rather a list of potential exceptions, so I can see and decided for what cases I should better build a specific catch block and which Exceptions can be handled by a generic catch block.