Skip to content

GWT Integration Error

apetrelli edited this page Apr 26, 2013 · 1 revision

The gwt-integration-error is a library that helps to deal with error and exception management.

The problems

The solutions

It is needed to show error messages to the client

The problem: without configuring anything, the errors are simply logged but no message is shown to the client. A way to inform the client that something wrong happened should be provided.

The solution: Subclass and use BaseUncaughtExceptionHandler.

For example, there is the readily-available DialogBoxUncaughtExceptionHandler that shows a simple dialog box when an error happens.

You need to configure it in your module loading method:

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