You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ti...@yahoo.de on 2001/04/26 08:39:22 UTC

Why isn't ActionsErrors throwable?

Hello,

I've got a design question concerning the design of
action classes and action class inheritance. I am
trying to implement a reusable method in an action
class. This method should be in a class named 
MyActionBase: 

protected MyBusinessObject doSomething(...) throws
ActionErrors

The question is: Why doesn't ActionErrors extends
Throwable? Does it make sense to make a change in the
framework class org.apache.struts.action.ActionErrors
and make it throwable?

Thanks,

Tillmann
---
tillmannschulz@yahoo.de

__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de

Re: Why isn't ActionsErrors throwable?

Posted by ti...@yahoo.de.
Hi,
> essentially ActionErrors is a message container
> more than an exception.  i think the name reflects
> this as well...  it is not called ActionException.
You are right, ActionErrors is a container, but
ActionError is sth. like an error class with a error
message in it.
I was just a little bit confused about the naming
because in java.lang.* every *Error-class extends
Throwable. 

Cu,

Tillmann
--
Tillmann Schulz
tillmannschulz@yahoo.de


__________________________________________________________________
Do You Yahoo!?
Gesendet von Yahoo! Mail - http://mail.yahoo.de

Re: Why isn't ActionsErrors throwable?

Posted by Chris Butler <pa...@orpheusdesign.com>.
essentially ActionErrors is a message container
more than an exception.  i think the name reflects
this as well...  it is not called ActionException.

chris

At 04:44 PM 4/26/2001 +1000, Jim Richards wrote:

>Because exceptions are slow, and can only handle one error
>at a time. The design as it is, allows for multiple action
>errors to be returned to a page for display.
>
>Exceptions should be for catastrophic errors that cause
>the system to barf. Having a blank password doesn't really
>fit within that framework.
>
> > The question is: Why doesn't ActionErrors extends
> > Throwable? Does it make sense to make a change in the
> > framework class org.apache.struts.action.ActionErrors
> > and make it throwable?


Re: Why isn't ActionsErrors throwable?

Posted by Jim Richards <gr...@cyber4.org>.
Because exceptions are slow, and can only handle one error
at a time. The design as it is, allows for multiple action
errors to be returned to a page for display.

Exceptions should be for catastrophic errors that cause
the system to barf. Having a blank password doesn't really
fit within that framework.

> The question is: Why doesn't ActionErrors extends
> Throwable? Does it make sense to make a change in the
> framework class org.apache.struts.action.ActionErrors
> and make it throwable?