How do you handle the exceptions in your application? An exception can be thrown at any layer within an application. Will you silently handle an exception in a layer or propagate it to the adjacent layer? The exception handling strategy is an important part of your application design.
Often an exception can be thrown by non-availability of resources such as a service or a database. Do you think of handling such exceptions during your design? Ugly exception stack trace could be seen by the users, if they are not handled explicitly.
In web applications, occurrence of exception stack trace on web pages can be easily avoided by configuring error pages in web.xml for frequently occurring error codes such 500 or 404 and common exceptions such as your application specific checked or runtime exception. The exception handling strategy of an application should at least configure the error pages.
Then you need…
View original post 264 mots de plus