Skip to content

Commit

Permalink
Merge pull request #910 from kosso/patch-1
Browse files Browse the repository at this point in the history
Fire the 'error' event if the webView receives an error.
  • Loading branch information
billdawson committed Jul 3, 2012
2 parents cf6f133 + 7d098eb commit 9bf2cf3
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ public void onReceivedError(WebView view, int errorCode, String description, Str
//TODO report this to the user
String text = "Javascript Error("+errorCode+"): " + description;
Log.e(LCAT, "Received on error" + text);

// Kosso : Dec 10, 2011
// fire the error event!!!
KrollDict data = new KrollDict();
data.put("url", failingUrl);
data.put("description", description);
data.put("errorCode", errorCode);
data.put("message", description);
data.put("type", errorCode);
webView.getProxy().fireEvent("error", data);

}

@Override
Expand Down

0 comments on commit 9bf2cf3

Please sign in to comment.