Wednesday, 11 September 2013

How to manually handle Unchecked Exceptions for logging ,recovery or any Custom Work?

How to manually handle Unchecked Exceptions for logging ,recovery or any
Custom Work?

I am creating unchecked exceptions.What I have seen is that most
exceptions call super().So I have followed the similar pattern.
I want to know how to handle unchecked Exceptions(System defined and
Custom) for logging purposes,for recovery of application or from that
particular method,or any other Custom work ?
I am working on multi threaded environment and I am going to create only
unchecked exceptions.Now if one Thread throws unchecked exception,then
depending on the severity of Unchecked Exception,I would either kill that
thread or continue as it is,but logging in both cases.
If I catch the unchecked Exception then there would be no point of making
it unchecked. So Is there any way to solve the problem.Please suggest and
guide me with your experiences.
Also,I have seen that many frameworks like Spring,Hibernate are moving
towards Unchecked Exceptions by Wrapping Checked Exceptions in Unchecked
Exception.
Please don't suggest me to use checked Exceptions because it is a
debatable topic.Sorry.

No comments:

Post a Comment