On Feb 11, 12:09 am, Bob Kerns <[email protected]> wrote:
> I was catching all caught and uncaught RuntimeExceptions.
> ArithmeticException is a subclass of RuntimeException, so it SHOULD
> have stopped at the point of the throw.

I wrote a simple test:

    public static void testThrow() {
        try {
            System.out.println("throwing");
            throw new ArithmeticException("whee");
        } catch (RuntimeException re) {
            System.out.println("caught");
        }
    }


I connected to it with jdb, and did the following:

% jdb -attach localhost:8700
<1> main[1] catch all java.lang.RuntimeException
Set all java.lang.RuntimeException
<1> main[1] cont
>
Exception occurred: java.lang.ArithmeticException (to be caught at:
android.test.HelloWorld.testThrow(), line=478 bci=15)"thread=<1>
main", android.test.HelloWorld.testThrow(), line=477 bci=14

I also tried it uncaught and it worked that way as well.  The
exception is definitely getting reported to the debugger when you
request a break on a subclass of the thrown class.

It's possible Eclipse is ignoring the exception event.  I'm not sure
why that would be though.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to