craigmcc    2002/06/15 21:50:01

  Modified:    src/share/org/apache/struts/action ExceptionHandler.java
  Log:
  When an AppException (or subclass thereof) is being handled, use
  getError() to retrieve the ActionError instance that was already
  created along with that AppException (possibly with localization
  and parameter substitution), instead of creating a new one.
  
  Thanks for the suggested fix!
  
  PR:  Bugzilla #9529
  Submitted by: Wes Price <ww2 at acm.org>
  
  Revision  Changes    Path
  1.3       +1 -1      
jakarta-struts/src/share/org/apache/struts/action/ExceptionHandler.java
  
  Index: ExceptionHandler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/action/ExceptionHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExceptionHandler.java     13 Jan 2002 00:25:35 -0000      1.2
  +++ ExceptionHandler.java     16 Jun 2002 04:50:01 -0000      1.3
  @@ -112,7 +112,7 @@
   
           // Figure out the error
           if (ex instanceof AppException) {
  -            error = new ActionError(ae.getKey());
  +            error = ((AppException) ex).getError();
               property = ((AppException) ex).getProperty();
           } else {
               error = new ActionError(ae.getKey());
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to