Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#116 trycatch task doesn't catch Error

closed-invalid
nobody
None
5
2005-07-29
2004-12-01
easyproglife
No

I am using dbUnit. When it fails it throws
junit.framework.AssertionFailedError. I put dbUnit task in
try, but it never gets into catch block. I assumes that
this is because the Throwable is not an Exception but
Error.

Discussion

  • Matt Inger
    Matt Inger
    2005-02-03

    Logged In: YES
    user_id=83032

    This task is designed to catch BuildException instances. If
    your code throws some other type of error it will not be
    caught. The task you are using should be catching this and
    wrapping it in a BuildException.

    Things like Error and RuntimeException are unrecoverable
    anyway, so i don't see much point in adding support for
    catching them anyway, but if necessary, i could always do
    that.

     
  • Matt Inger
    Matt Inger
    2005-07-29

    • status: open --> closed-invalid