-
-
Notifications
You must be signed in to change notification settings - Fork 138
Closed
Milestone
Description
Add a setting to wrap the calls in to CallJSMethod generated from the SBG in try-catch block to avoid throwing exceptions from their execution.
The setting can be enabled in the app/package.json file:
{
"main": "main.js",
"android": {
"suppressCallJSMethodExceptions": true
}
}
If enabled instead of generating code like this:
public boolean onQueryTextChange(java.lang.String param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
return (boolean)com.tns.Runtime.callJSMethod(this, "onQueryTextChange", boolean.class, args);
}
SBG will generate code like this:
public boolean onQueryTextChange(java.lang.String param_0) {
java.lang.Object[] args = new java.lang.Object[1];
args[0] = param_0;
try {
return (boolean)com.tns.Runtime.callJSMethod(this, "onQueryTextChange", boolean.class, args);
} catch (Throwable t) {
android.util.Log.w("Error", t);
return false;
}
}
Metadata
Metadata
Assignees
Labels
No labels