Marco
If these are expected exceptions catch them and forward to a failure page
with whatever actionErrors objects and messages you wish to create.
Or throw them all and handle the different messages in your exceptionHandler
class.

Regards
Steve

-----Original Message-----
From: Marco Mistroni [mailto:[EMAIL PROTECTED]
Sent: 26 January 2004 16:45
To: 'Struts Users Mailing List'
Subject: Dealing wiht exception in DispatchAction 


Hi all,
        I am using a DispatchAction in my application. I have declared
the
Type of the exception that will be raised in case one method raises an
exception..
But I am stuck with the fact that i have, in 4 methods, the same type of
Exception but with different message.
When I declare the exception in struts-config, I can specify only one 
Key ..

And I would need a way to parametrize the message of the exception, or
to
Be able to specify which message to use for different methods.

For example

I have following methods (and associated exceptions)

Create()  / failed to create product

Delete() / failed to delete product

Find()  / product not found


All of those methods raise the same exception (ProductException) but
with different messages.
How can I make so that I can raise same exception, with different
messages, from a dispatch action?

Thanx in advance and regards
        marco


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


=======================================================
This message contains information that may be privileged or confidential and is the 
property of the Cap Gemini Ernst & Young Group. It is intended only for the person to 
whom it is addressed. If you are not the intended recipient, you are not authorised to 
read, print, retain, copy, disseminate, distribute, or use this message or any part 
thereof. If you receive this message in error, please notify the sender immediately 
and delete all copies of this message.
=======================================================


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

Reply via email to