Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Can't propagate exception from SC.ask BooleanCallback

$
0
0
I had a button display a dialog using SC.ask with a BooleanCallback. I noticed nothing was happening so I ran the debugger. I followed it until I found an exception was being thrown that was preventing my code from ever running. I had no idea the exception was being thrown because it was getting swallowed somehow--no error popup or anything in the console/log. I wrote a test case below...

Code:

public void onModuleLoad() {
  SC.ask("asdf", new BooleanCallback() {
    @Override
    public void execute(Boolean value) {
      throw new NullPointerException();
    }
  });
}

SmartGWT Power 4.0 10-5-2013

Viewing all articles
Browse latest Browse all 4756

Trending Articles