Hi ! I want to find out what is best thing to do when it comes to Exception Handling?
I have my Application specific AppException I create many different sub-class of AppExceptions based on different conditions in my application. In struts config I am trying to put exception with All Action with AppException ( My base Application specific Exception ) <action path="/sectorProcess" name="sectorForm" type="web.action.SectorAction" scope="request" parameter="dispatch"> <exception key="SessionExpiredException" type="web.exception.AppException" path="/sessionExpired.jsp" /> 1. In my DAO/DTO/Business layers should i keep on propagating exception upto Action class. In my Action I have put try/catch for generic Exception, so all known exception including my AppException are caught and logged. Struts frame work will redirect to AppException related jsp. OR 2. When ever exception happens in DAO/DTO/Business layers I catch it there Make my application specific Exception without propagating to all the way upto Action class because Struts frame work would redirect to AppExcpetion jsp based on struts-config. Pls. advise ! Thanks. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.