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>() {
@Override
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.
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.