> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 15, 2004 2:18 PM > To: [EMAIL PROTECTED] > Subject: RE: Oreilly example question > > > I have done that in 1.1, but the issue I have is that each of > my actions could potentially throw many different Exceptions > that all have different text associated with them. > In addition to that, I would love to be able to see the root > cause of each error. > > So: > 1. Do I create a global exception entry for each type of > error I have a class for, and Struts will be able to deduce > which kind of error it is? > > 2. Will I need to manually call printStackTrace() in order to > get the root cause printed in the logs?
If I understand what you want correctly.. If you're using Javas nested exception, just add the cause as you re-throw each excpeions. If your using jakarta commons nested exceptions, then you can do the same, but with any of the java versions. Either is better then walking the stack trace for the root cause, and allows you to mix and match your two above approaches. > > > -------------------- > Mick Knutson > Wells Fargo Business Direct > (415) 222-1020 > > "This message may contain confidential and/or privileged > information. If you are not the addressee or authorized to > receive this for the addressee, you must not use, copy, > disclose, or take any action based on this message or any > information herein. If you have received this message in > error, please advise the sender immediately by reply e-mail > and delete this message. Thank you for your cooperation." > -------------------- > > > > -----Original Message----- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 15, 2004 11:59 AM > To: Struts Users Mailing List > Subject: RE: Oreilly example question > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, December 15, 2004 11:29 AM > > To: [EMAIL PROTECTED] > > Subject: Oreilly example question > > > > > > I was looking into refactoring our Exception Handling and > > looked at the struts 1.1 Oreilly book. > > My question is this. > > They talk about extending the ExceptionHandler to provide > > more extended functionality. Is this still the proper > > approach in Struts 1.2.4? > > 1.2.4 provides the ability to say on this exception, go here: > <global-exceptions> > <!-- sample exception handler > <exception > key="expired.password" > type="app.ExpiredPasswordException" > path="/changePassword.jsp"/> > end sample --> > </global-exceptions> > as well as a way to specify a handler for the exception. See > the DTD for more details: > http://struts.apache.org/dtds/ > > > > > > -------------------- > > Mick Knutson > > Wells Fargo Business Direct Information Systems > > (415) 222-1020 > > > > "This message may contain confidential and/or privileged > > information. If you are not the addressee or authorized to > > receive this for the addressee, you must not use, copy, > > disclose, or take any action based on this message or any > > information herein. If you have received this message in > > error, please advise the sender immediately by reply e-mail > > and delete this message. Thank you for your cooperation." > > -------------------- > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]