Skip to content

Commit

Permalink
Don't raise an exception on JavaScript warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lericson committed Oct 5, 2010
1 parent b498a98 commit acc9a46
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spidermonkey/error.c
Expand Up @@ -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;

Expand Down

0 comments on commit acc9a46

Please sign in to comment.