Hi All,
I have a web app where I exposed a class's static method using JSNI,
as in the JSNI example. I execute the method from the native event
handler.
Within the method, I try and catch, and return any exception's message
as the method's return value.
The method works properly in 2.0.4, but in 2.1.0 it only works in
devmode
In 2.1.0 production mode any exception I get returns "Index:-1, Size:
0" and is always in the Throwable catch. With no Throwable catch, the
browser states "object error".
public static String parse(String script) throws ParseException{
try {
CLBParse parser = new CLBParse(new
MyStringReader(script));
SimpleNode root = parser.Input();
return "";
} catch (ParseException e) {
return e.getMessage();
}catch( Throwable e) {
GWT.log("something bad", e);
return e.getMessage();
}
return "";
}
public native void export() /*-{
$wnd.TryParse =
$entry(@com.test.app.client.CalcScriptReformatter::parse(Ljava/lang/
String;));
}-*/;
I've tried with and without the $entry wrapper.
Is this a bug in 2.1.0, or should I be doing something different?
Thanks,
-Rob
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.