Hi,

I already posted this question to stackoverflow. Posting again
here since I did not get any working answer. Sorry for the
duplicate post.

I registered my custom UncaughtExceptionHandler to catch
all the client/server side runtime exceptions. The
handler does not catch them, but simply sending it to
browser.

Did I my understood the UncaughtExceptionHandler functionality
or any other issue?

-thanks
moorsu.

Here is my code.


// ------------ Class 1 -------------------------------

package mypackage;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;

public class MyEntryPoint implements EntryPoint {

    public void onModuleLoad() {
        GWT.setUncaughtExceptionHandler(new ClientExceptionHandler());
        startApplication();
    }

    private void startApplication() {
        Integer.parseInt("I_AM_NOT_A_NUMBER");
        // or any exception that results from server call
    }
}

// --------------- Class 2 -----------------------------

package mypackage;

import com.google.gwt.core.client.GWT;

public class ClientExceptionHandler implements GWT.UncaughtExceptionHandler
{

    public void onUncaughtException(Throwable cause) {

        System.out.println(cause.getMessage());
    }
}

// --------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/google-web-toolkit?hl=en.

Reply via email to