Friday, April 11, 2014

SuperDevMode (SDM) and catch basic Exception in Anonymous Classes

Hi,
   I have created "Hello World" with one button and click handler that throws NPE. Simple code :

===== MyCalculator.java
final Button sendButton = new Button("Send");
sendButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
String str = null;
str.length(); // BUG. NullPointerException
}
});
 
I have check :
1) Chrome Console - no useful information with class and line number (see screenshot)
2) Chrome Source tab + turn on breakpoint on exception - the some. (see screenshot)

Any idea how can I get Java source name and line number? Af course the real problem is our 200k LOC of client code project in GWT and usage of SDM. I'm using GWT 2.6. 
Thank you for your help
  Regards,
     Matic

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment