struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeromy Evans <jeromy.ev...@blueskyminds.com.au>
Subject Re: freemarker error - Any ideas?
Date Wed, 23 Apr 2008 04:48:31 GMT
akash agrawal wrote:
> Yes, I am adding an action error in my action. Somewhere in my action a NullPointerException
gets thrown and I add that exception to my actionerror  . I guess thats not incorrect to do
that, is it?
>
>   
Ensure you're not adding the null object to the collection of addErrors

eg. This is okay:
catch (Exception e) {
   addActionError(e.getMessage());
}
I believe the action errors is intended as a collection of Strings, 
although it's not defined as a Collection<String>.

Fix the NPE though.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message