You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Edwards, Jayme" <JC...@software.rockwell.com> on 2000/04/27 23:39:40 UTC

Request for Patch to BuildException

I'm writing a module (as most of you know) in Forte to use Ant projects inside the IDE. One of my needs is to determine if an error during a build was thrown by Javac, and to then get the line/column number of the error or at least to determine it from the string. I looked at BuildException (thrown by execute() of targets and tasks) and noticed it gets this exception passed into it's constructor but it is kept private. Would it be possible to add an "Exception getCause()" method to retrieve the underlying error. Otherwise possibly we could make this method protected, allow us to subclass it, and pass it into a "void setCauseHandler(CauseHandler handler)" method exposed by the project or target/task object. 

Any help would be great, I'd be willing to make the changes myself but it will probably be much quicker to those of you intimate with the source.

Thanks,
Jayme

Re: Request for Patch to BuildException

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "EJ" == Edwards, Jayme <JC...@software.rockwell.com> writes:

 EJ> I looked at BuildException (thrown by execute() of targets and
 EJ> tasks) and noticed it gets this exception passed into it's
 EJ> constructor but it is kept private.

While looking at the source to BuildException I remembered your
mail. There is a method getException that should do exactly what
you've described.

Given that the last code change was on 2000/04/26 and your mail dates
2000/04/27 (with a reminder on 2000/05/08) I guess I don't understand
what you were asking for.

Could you please check whether getException is what you need?

Stefan