I'm working with GWT currently but I find it nearly impossible to find errors with the current error messages in the Chrome console. I get the errors both when in local development mode and when I'm hosting the app on GAE. How do I get the actual java error? Where it says which line and what exception I got? And btw what is the error I'm looking for called?
Thanks in advance!
In GWT 2.1.1 here comes UmbrellaException that collects a Set of child Throwables together. Try this:
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
@Override
public void onUncaughtException(@NotNull Throwable e) {
ensureNotUmbrellaError(e);
}
});
}
Where ensureNotUmbrellaError
is defined as follows:
private static void ensureNotUmbrellaError(@NotNull Throwable e) {
for (Throwable th : ((UmbrellaException) e).getCauses()) {
if (th instanceof UmbrellaException) {
ensureNotUmbrellaError(th);
} else {
th.printStackTrace();
}
}
}