inheritance - Is there a way to handle exception globally in Java? -



inheritance - Is there a way to handle exception globally in Java? -

in c#, can phone call method takes function or action , execute within seek catch. doing that, can handle exceptions in 1 place making more manageable.

since java doesn't have delegates, cannot performed same way. there alternative?

we have 2 classes: , b. b subclass of a. methods in b override ones in a.

will have handle exceptions in methods in b or there way handle in , rethrow in b? assumption have handle in b, want confirm this.

thread.setdefaultuncaughtexceptionhandler(uncaughtexceptionhandler eh) approximately looking for

java inheritance exception-handling

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -