javierdotnet / gwt-ext

Automatically exported from code.google.com/p/gwt-ext
0 stars 3 forks source link

UncaughtExceptionHandler does not work #434

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Implement onModuleLoad as follows
public void onModuleLoad() {
    GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
        public void onUncaughtException(Throwable arg0) {
            GWT.log("uncaught Exception", arg0);
            MessageBox.alert("uncaught Exception", arg0.getMessage());
        }
    });

    Button button = new Button("test");
    button.addListener(new ButtonListenerAdapter() {
        public void onClick(Button button, EventObject e) {
            throw new RuntimeException("bla");
        }
    });
    RootPanel.get().add(button);
}
2. Start the application
3. Click the Button test

What is the expected output? What do you see instead?
UncaughtExceptionHandler.onUncaughtException() should be called. This never
happens.

What version of the product are you using? On what operating system?
gwtext-2.0.5 on windows

Please provide any additional information below.
It seems to me that native javaScript of gwt-ext, which handles events
ignores the UncaughtExceptionHandler.

Original issue reported on code.google.com by martin.s...@gmail.com on 7 Oct 2008 at 2:47