You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Johan Compagner <jc...@j-com.nl> on 2001/05/09 13:18:47 UTC

Re: please help...this doesn't want to display the exception, is this correct?

ActionError constructor wants a message key. not just a string.
you could do:

errors.add("beanErr",new ActionError("general.exception",ex.toString()));

and then have a general.exception in youre resouce bundle:
general.exception="An exception occured: {0}"

johan

----- Original Message -----
From: "Dudley Butt@i-Commerce" <Du...@za.didata.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, May 09, 2001 10:55 AM
Subject: please help...this doesn't want to display the exception, is this
correct?


>     } catch (Exception ex) {
>       ex.printStackTrace();
>       errors = new ActionErrors();
>       errors.add("beanErr",new ActionError(ex.toString()));
>     }
>