Skip to content

Instantly share code, notes, and snippets.

@niloc132
Last active December 20, 2015 04:29
Show Gist options
  • Save niloc132/6070782 to your computer and use it in GitHub Desktop.
Save niloc132/6070782 to your computer and use it in GitHub Desktop.
Full stack traces in compiled code
<!-- Turn on GWT logging -->
<set-property name="gwt.logging.logLevel" value="FINEST" />
<set-property name="gwt.logging.enabled" value="TRUE" />
<!-- ...except the popup handler, which is just about useless -->
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<!-- optional: turn on gxt internal logging -->
<set-property name="gxt.logging.enabled" value="true" />
<!-- emulated stack traces so you can see the full error -->
<set-property name="compiler.emulatedStack" value="true" />
<set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true" />
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers" value="true" />
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
public void onUncaughtException(Throwable e) {
Window.alert("Error: " + e.getMessage());
log.log(Level.SEVERE, e.getMessage(), e);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment