I'm having weird issues with GWT 2.4.0. I am sending a REST request, in its callback I am parsing a JSON document. Such parsing can throw a RuntimeException. While an exception is indeed thrown in the Development Mode, it doesn't propagate to a browser when running in the Production Mode (there's nothing in the Chrome Console).
Even if I reduce my code to the following, it still won't work in the Production Mode.
@Override
public void onModuleLoad() {
final RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, "some-json-url");
try {
requestBuilder.sendRequest(null, new JsonRequestCallback());
} catch (final RequestException e) {
throw new RuntimeException(e);
}
}
private static class JsonRequestCallback implements RequestCallback {
@Override
public void onResponseReceived(final Request request, final Response response) {
throw new RuntimeException("exception");
}
@Override
public void onError(final Request request, final Throwable exception) {
throw new RuntimeException(exception);
}
}