gpt4 book ai didi

java - 在 GWT 2.7 super 开发模式下调试,stackTrace 丢失?

转载 作者:搜寻专家 更新时间:2023-11-01 03:48:40 26 4
gpt4 key购买 nike

我刚刚从 GWT 2.5.1 迁移到 2.7,并且是第一次使用 SuperDev 模式。我在 Chrome 开发工具中启用了“JavaScript source maps”。在 Chrome 控制台中,异常如下所示:

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 我正在捕获异常:

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

如何获取堆栈跟踪?我试过这样的事情 https://stackoverflow.com/a/24334132/1660637但无法工作。

最佳答案

您是否尝试将这些添加到您的 gwt.xml 文件中?

<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"/>

关于java - 在 GWT 2.7 super 开发模式下调试,stackTrace 丢失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35085866/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com