harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko" <mloe...@gmail.com>
Subject Re: More helpful error messages
Date Mon, 27 Mar 2006 05:17:13 GMT
2006/3/27, Magnusson, Geir <geir.magnusson@intel.com>:
> Did you catch it?

yes i did:

public class test3 {
    static int i;
    static Exception e = new Exception("");

    public static void main(String[] args) {
        for( int i = 0; i < 5000000; i++ ) {
            try {
                a();
            } catch (Exception e) {
            }
        }
    }

    static void a() throws Exception {
        i++;
        throw e;
    }
}

I've also tried to store it:

        for( int i = 0; i < 5000000; i++ ) {
            try {
                a();
            } catch (Exception e) {
                e1 = e;
            }
        }

The time is almost the same.

Thanks,
Mikhail

Mime
View raw message