> From: Wascally Wabbit [mailto:[EMAIL PROTECTED] > > At 05:26 AM 2/19/2004, you wrote: > > Yes, but Ant basically pretends they did not occur. It does > not try to "deal" with anything. In my situation the error > was an out-of-memory issue. There are some environment issues > that Ant tries to handle (ClassLoader stuff, etc.) FINE. But > there's a fundamental reason why some problems are classified > as errors and not exceptions. Just my 2cents. >
I grant you that ANT should look closer at any Errors it catches. Some of them are known to be insurmountable (e.g., OutOfMemoryError) and should probably stop the build even if -keepgoing is on. On the other hand, most errors, including things like LinkageError(?) and other class management errors that can be due to bad classloading configuration, should be treated (when it happens during the execution of a task) like any other failure of the task and throw a BuildException. What would happen afterwards depends on what te build decides to do about BuildExceptions. > > > > The code could be easily switched to capture all > > > Exceptions instead of Throwables. Moreover, when it does > capture an > > > error, Ant effectively masks the serious Error with a generic > > > BuildException (which it really isn't). Unless you run > Ant in debug > > > mode you'd never actually see the root cause (in the > > > BuildException's stack dump). > > > > > > >If the BuildException stack trace does not print the stack > trace of the > >nested exception (if any), well that is a bug in the code for > >BuildException. We should call recursively and print the nested > >exception stack trace. I agree with you on that. > > The stack trace does output the enclosed exception. BUT the > stack trace is not displayed normally; only the message. > There's no problem with the BuildException class per se. > OK > > > > Is this a bug or a "working as designed" feature of Ant? > > > > > > >As per my discussion on a different thread, this to me is a feature > >that should be used not only for keepGoing but on the normal > treatment > >of exceptions thrown by <tasks>. > > Exceptions fine. With Errors I think Ant should select the > ones that Ant knows hows to deal with; others it should let > pass (or at least not pretend like nothing happened). > I think we are on the same spirit of things, although I am more for throwing only the very special cases (as oppose to all but). Jose Alberto --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]