You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jose Alberto Fernandez <ja...@cellectivity.com> on 2004/05/04 15:30:24 UTC

Trapping RuntimeExceptions form Tasks

Hi,

As part of a bug report on <subant/>'s keepgoing functionality,
we started talking about why ANT was not catching RuntimeExceptions
(and maybe Errors) from the tasks and converting them to BuildExceptions
with proper location information.

We never did something about it besides fixing the <subant/> specific
part of it. I want to bring the subject back, since we may want to fix
this before 1.6.2.

Is there any interest on this issue? Shall we track it in bugzilla?
I think part of the difficulty was whether to catch only
RuntimeExceptions
or all Throwables (except for some very few).

The fix itself is quite simple ce we know what we want done.

Shall we do it before 1.6.2?

Jose Alberto




Re: Trapping RuntimeExceptions form Tasks

Posted by Stefan Bodewig <bo...@apache.org>.
On 04 May 2004, Erik Meade <an...@eghm.net> wrote:

> Why don't you feel comfortable catching Errors?

Since Errors should only be thrown in unrecoverable situations (that's
the theory, I know).

I don't think that Ant should continue after an OutOfMemoryError for
example  There are others and we'll never manage to enumerate all
Throwables that we don't want to catch.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Trapping RuntimeExceptions form Tasks

Posted by Erik Meade <an...@eghm.net>.
On Tue, 2004-05-04 at 07:40, Stefan Bodewig wrote:
> On Tue, 4 May 2004, Jose Alberto Fernandez <ja...@cellectivity.com>
> wrote:
>
> > I think part of the difficulty was whether to catch only
> > RuntimeExceptions or all Throwables (except for some very few).
> 
> I wouldn't feel comfortable with catching Errors.
> 
> Stefan
> 

Hey Stefan,

Why don't you feel comfortable catching Errors?  Struts exception
handling also doesn't catch Errors.  We work around that by extending
ActionServlet :(

Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Trapping RuntimeExceptions form Tasks

Posted by Stefan Bodewig <bo...@apache.org>.
On Tue, 4 May 2004, Jose Alberto Fernandez <ja...@cellectivity.com>
wrote:

> Is there any interest on this issue?

Not too much, it seems 8-)

> Shall we track it in bugzilla?

I prefer to have development discussions on this list.  YMMV.

> I think part of the difficulty was whether to catch only
> RuntimeExceptions or all Throwables (except for some very few).

I wouldn't feel comfortable with catching Errors.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org