Permalink
Browse files

Don't raise an exception on JavaScript warnings

  • Loading branch information...
lericson committed Oct 5, 2010
1 parent b498a98 commit acc9a460a98186ee2d4cde726f8284443ae08a0b
Showing with 8 additions and 0 deletions.
  1. +8 −0 spidermonkey/error.c
@@ -75,6 +75,14 @@ add_frame(const char* srcfile, const char* funcname, int linenum)
void
report_error_cb(JSContext* cx, const char* message, JSErrorReport* report)
{
/* Subtle note about JSREPORT_EXCEPTION: it triggers whenever exceptions
* are raised, even if they're caught and the Mozilla docs say you can
* ignore it.
*/
/* TODO What should we do about warnings? A callback somehow? */
if (report->flags & JSREPORT_WARNING)
return;

const char* srcfile = report->filename;
const char* mesg = message;

0 comments on commit acc9a46

Please sign in to comment.