On Mon, 3 Feb 2003, David Graham wrote:

> Date: Mon, 03 Feb 2003 18:25:19 -0700
> From: David Graham <[EMAIL PROTECTED]>
> Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Standard Actions Sending Errors
>
> Is it appropriate for the standard actions to call response.sendError(... or
> would it be better for them to throw various types of Exceptions?  It seems
> like it would be more flexible to throw exceptions now that we have
> declarative exception handling.  This would allow the client programmer to
> determine what to do with the exception, which might include sending an
> error code to the user.
>

For 1.1, it makes sense to me that we declare a couple of specific
exceptions that can then be caught and managed using the exception mapping
technology.

> I came across this issue while looking at the different ways
> LookupDispatchAction and DispatchAction handle errors.
>
> Would it be backwards incompatible to change what the actions do when they
> encounter an error?
>

I suspect that the current behavior w.r.t. errors is so unusable that
anyone concerned about it has already subclassed the thing anyway.

+1 for defining appropriate exceptions that can be thrown for this use
case.

> Thanks,
> Dave

Craig


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

Reply via email to