ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What is the need of rethrowing UserDefined Exception instead of System defined Exception ?

In the DAO layer we might be catching so many system defined exceptions, if we want to rethrow them then we need to rethrow so many system defined exceptions. Instead of that, catch the system defined exceptions and rethrow flow related single user defined exceptions.
Note : if there are 10 flows then we have to write 10 different user defined exceptions.
Sometimes we have to display different error pages for different flows, so its better to rethrow user defined exceptions and display error page.**
Related Posts Plugin for WordPress, Blogger...
Flag Counter