More friendly exception

0 views
Skip to first unread message

Tiago Serafim

unread,
Jun 2, 2006, 3:15:08 PM6/2/06
to Google-We...@googlegroups.com
Hi,

I think that a more friendly exception is needed when you try to use "setWidget" instead "add" on a PopupPanel. Here is what you get when you call the wrong method:

[ERROR] Uncaught exception escaped
java.lang.RuntimeException: JavaScript method '@ com.google.gwt.user.client.ui.impl.PopupImplIE6::fixup(Lcom/google/gwt/user/client/Element;)' threw an exception
    at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java:394)
    at com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid (ModuleSpaceIE6.java:283)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:127)
    at com.google.gwt.user.client.ui.impl.PopupImplIE6.fixup(PopupImplIE6.java:43)
    at com.google.gwt.user.client.ui.PopupPanel.show(PopupPanel.java:211)
    at br.com.rachacuca.client.Kakuro$1.onClick(Kakuro.java:37)
    at com.google.gwt.user.client.ui.ClickListenerCollection.fireClick (ClickListenerCollection.java:36)
    at com.google.gwt.user.client.ui.FocusWidget.onBrowserEvent(FocusWidget.java:84)
    at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:902)
    at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:886)
    at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:854)
    at com.google.gwt.dev.shell.StaticJavaDispatch.callMethod (StaticJavaDispatch.java:45)
Caused by: com.google.gwt.core.client.JavaScriptException: JavaScript TypeError exception: ' children.1.offsetWidth' é nulo ou não é um objeto (is null or isn´t an object)
....

It took me some time to dig some working example¹ and figure out why my code didn´t work....

1. http://gwt.components.googlepages.com/tooltiplistener2

Thanks in advance,

--
Tiago Serafim
Reply all
Reply to author
Forward
0 new messages