Take the 2-minute tour ×

I want to test does my gwt-log module works as expected in my application. I want to generate some error on client so the little box with error notification show up (it also contains the button "Show more" or something like that which shows the full stack trace if you click on it). I once got it, but if I repeat that same scenario, it simple won't show up. I tried to add exception to handler for edit button:

view.getGridButton().addListener(Events.Select, new SelectionListener<ButtonEvent>() {
    public void componentSelected(ButtonEvent ce) {

    throw new RuntimeException("Button Generated Error");


... but this doesn't throw exception visible in console, log or screen (browser).

Any suggestions? Thanks.

share|improve this question
Integer.parseInt("a"); will generate an exception for you –  pistolPanties Oct 11 '11 at 11:20
@pistolPanties : I tried this but it happens nothing; nothing visible in console, log or screen. I even tried through debug mode. Debugger comes to this line for parsing integer and eventually comes to point where it throws InvocationTargetException , but still nothing. –  Mario Oct 11 '11 at 12:31
add comment

2 Answers

I think this may be the issue:

Exceptions: try, catch, finally and user-defined exceptions are supported as normal, although Throwable.getStackTrace() is not meaningfully supported in web mode. See:


Are you in web mode when you are running this? Remember that GWT compiles the java code to javascript code under the covers. You may have to use JSNI in order to accomplish this.

share|improve this answer
add comment
up vote 0 down vote accepted

I finally found out the cause of the problem. In my Error handler, I called the method Log.error(...) with the error trace and IP address. The problem was in method for fetching IP address, so the log didn't show up in my log file. Your answer @pistolPanties works after this. Many thanks.

share|improve this answer
add comment

Your Answer


