Re: Raising an exception in a callback

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Feb 26 2008 - 08:08:41 EST

  • Next message: Alexander Lamb (dev): "Re: Raising an exception in a callback"

    On Feb 26, 2008, at 3:04 PM, Alexander Lamb (dev) wrote:

    >
    > e.getCause() will give me an InvocationTargetException.

    Sorry, I should've been more explicit. You need to unwrap the
    exception all the way to the root cause:

    Throwable th = e;
    while(th.getCause() != null) {
        th = th.getCause();
    }

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Feb 26 2008 - 08:09:12 EST