Debugging in GWT 2.7 Super Dev Mode, stackTrace missing?

I just switched from GWT 2.5.1 to 2.7 and first used SuperDev mode. I have included "source JavaScript maps" in Chrome dev tools. In Chrome Console, the exception is as follows:

com.google.gwt.event.shared.UmbrellaException: Exception caught: For input string: "a"
  at fillInStackTrace_0_g$
  at Throwable_3_g$
  at Exception_3_g$
  at RuntimeException_3_g$
  at UmbrellaException_3_g$
  at UmbrellaException_5_g$
  at fireEvent_1_g$
  at fireEvent_3_g$
  at fireNativeEvent_1_g$
  at onBrowserEvent_2_g$
  at dispatchEventImpl_0_g$
  at dispatchEvent_4_g$
  at dispatchEvent_6_g$
  at apply_0_g$
  at entry0_0_g$
  at <anonymous>
Caused by: java.lang.NumberFormatException: For input string: "a"
  at fillInStackTrace_0_g$
  at Throwable_2_g$
  at Exception_2_g$
  at RuntimeException_2_g$
  at IllegalArgumentException_2_g$
  at NumberFormatException_2_g$
  at forInputString_0_g$
  at __parseAndValidateDouble_0_g$
  at parseDouble_0_g$
  at Double_2_g$
  at valueOf_68_g$
  at onClick_109_g$
  at dispatch_6_g$
  at dispatch_7_g$
  at dispatch_1_g$
  at dispatchEvent_2_g$
  at doFire_0_g$
  at fireEvent_2_g$
  at fireEvent_1_g$
  at fireEvent_3_g$
  at fireNativeEvent_1_g$
  at onBrowserEvent_2_g$
  at dispatchEventImpl_0_g$
  at dispatchEvent_4_g$
  at dispatchEvent_6_g$
  at apply_0_g$
  at entry0_0_g$
  at <anonymous>

OnModuleLoad I throw an exception:

GWT.setUncaughtExceptionHandler(new GWT.UncaughtExceptionHandler() {
        @Override
        public void onUncaughtException(Throwable e) {
            GWT.log(e);
        }
    });

How can I get stackTrace? I tried something like qaru.site/questions/1194136 / ... but could not work.

+4
source share
3 answers

Have you tried adding them to your gwt.xml file?

<set-property name="compiler.stackMode" value="emulated"/>
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers" value="true"/>
<set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true"/>
0
source

SuperDevMode, stacktraces GWT.log. GWT 2.8 .

, java.util.logging GWT.log, SDM.

0

onModuleLoad. , java.util.Logging . GWT.log .

/**   * ,   * (UmbrellaException) SuperDevMode.   */  private void setUncaughtExceptionHandler()  {     GWT.setUncaughtExceptionHandler( GWT.UncaughtExceptionHandler()     {        @Override        public void onUncaughtException (Throwable e)        {           Throwable unwrapped = (e);           BootBox.error(I18NMessages.getMessage(3774) + "\n\n" + );           LOGGER.log(Level.EXCEPTION, "onUncaughtException" + e.getMessage(), );        }

     public Throwable unwrap(Throwable e)
     {
        if (e instanceof UmbrellaException)
        {
           UmbrellaException ue = (UmbrellaException) e;
           if (ue.getCauses().size() == 1)
           {
              return unwrap(ue.getCauses().iterator().next());
           }
        }
        return e;
     }
  });

}

LOGGER .

public static final Logger LOGGER = Logger.getLogger("Something");
0

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


All Articles