GWT client umbrellaexception gets full error message in java

I am currently working with GWT, but it is almost impossible for me to find errors with current error messages in the Chrome console. I get errors both in local development mode and when placing the application in GAE. How to get the actual Java error? Where does he say which line and which exception I got? And by the way, what is the error I'm looking for?

Thanks in advance!

+1
source share
1 answer

In GWT 2.1.1, a UmbrellaException appears here that collects a set of child Throwables together. Try the following:

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(); } } } 
+5
source

Source: https://habr.com/ru/post/1438572/


All Articles