Permalink
Browse files

[#2583 state:fixed-in-qa]Catch JS exceptions in getJSValue and return…

… empty string like iOS
  • Loading branch information...
billdawson committed Dec 15, 2010
1 parent a7e63f5 commit c84d12e41cedeba00f5fd825ca21fd0fcc175d06
@@ -109,7 +109,7 @@ private void evalJS(String code)
private String returnValue;
public String getJSValue(String expression)
{
String code = "javascript:_TiReturn.setValue((function(){return "+expression+"+\"\";})());";
String code = "javascript:_TiReturn.setValue((function(){try{return "+expression+"+\"\";}catch(ti_eval_err){return '';}})());";
Log.d(LCAT, "getJSValue:"+code);
webView.loadUrl(code);
try {

0 comments on commit c84d12e

Please sign in to comment.