Incorrect cast hides full stack trace

11 views
Skip to first unread message

Craig Mitchell

unread,
1:27 AM (6 hours ago) 1:27 AM
to GWT Users
To reproduce:
2. Add a silly cast:   Integer notAnInt = (Integer)(Object)"hi";
3. Run super dev mode.
4. Visit your page.
5. It will crash on the cast, view the console.  It looks like this:

Screen.png

No mention of where your silly cast is.

However if you right click and "Copy console".  You get the following that does have where your silly cast is (highlighted in yellow):

Throwable.java:114 Uncaught Error: java.lang.ClassCastException
    at WPd_g$.Dz_g$ [as createError_0_g$] (Throwable.java:114:1)
    at WPd_g$.Oz_g$ [as initializeBackingError_0_g$] (Throwable.java:106:1)
    at WPd_g$.wz_g$ (Throwable.java:66:1)
    at WPd_g$.cA_g$ (Exception.java:29:1)
    at WPd_g$.kA_g$ (RuntimeException.java:29:1)
    at new WPd_g$ (ClassCastException.java:27:1)
    at dlf_g$ (InternalPreconditions.java:155:1)
    at qlf_g$ (InternalPreconditions.java:139:1)
    at plf_g$ (InternalPreconditions.java:134:1)
    at Lxc_g$ (Cast.java:74:1)
Dz_g$ @ Throwable.java:114
Oz_g$ @ Throwable.java:106
wz_g$ @ Throwable.java:66
cA_g$ @ Exception.java:29
kA_g$ @ RuntimeException.java:29
WPd_g$ @ ClassCastException.java:27
(anonymous) @ InternalPreconditions.java:155
(anonymous) @ InternalPreconditions.java:139
plf_g$ @ InternalPreconditions.java:134
Lxc_g$ @ Cast.java:74
amf_g$ @ App.java:43
OAc_g$ @ test_00046App__EntryMethodHolder.java:3
(anonymous) @ ModuleUtils.java:44
wI_g$ @ Impl.java:293
(anonymous) @ Impl.java:352
(anonymous) @ Impl.java:72
initializeModules_0_g$ @ ModuleUtils.java:55
(anonymous) @ GreetingService_TypeSerializer.java:10
PendingScript
h @ test.nocache.js:8
(anonymous) @ test.nocache.js:9
g @ test.nocache.js:6
w @ test.nocache.js:9
test @ test.nocache.js:17
(anonymous) @ test.nocache.js:18
PendingScript
Recompiler.loadApp @ test:348
(anonymous) @ test:568
(anonymous) @ test:286
__globals.callbacks.<computed> @ test:300
(anonymous) @ test?user.agent=safari&_callback=__gwt_sdm_globals.callbacks.c1777871930876:1
PendingScript
Recompiler.__injectScriptTag @ test:311
Recompiler.__jsonp @ test:304
Recompiler.compile @ test:284
Main.compile @ test:562
executeMain @ test:594
(anonymous) @ test:599
(anonymous) @ test:608
PendingScript
injectScriptTag @ test.nocache.js:52

Any idea why it doesn't show in the normal console?

Frank

unread,
3:04 AM (4 hours ago) 3:04 AM
to GWT Users
Click on the arrow before 'Uncaught exception' in the console?
This should expand the exception?

Op maandag 4 mei 2026 om 07:27:00 UTC+2 schreef Craig Mitchell:

Craig Mitchell

unread,
3:33 AM (4 hours ago) 3:33 AM
to GWT Users
Oh wow.  Yes, you're correct.  Massive air swing by me.  lol.  Thanks.

works.png
Reply all
Reply to author
Forward
0 new messages