Mercurial > pymonkey
comparison runtime.c @ 47:3f4982759e55
Converting JS exceptions into Python exceptions is now doable, albeit not yet implemented, thanks to the discovery of JSOPTION_DONT_REPORT_UNCAUGHT. Also, JS warnings are now converted into Python warnings.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Mon, 06 Jul 2009 08:13:45 -0700 |
parents | 951ad1b15587 |
children | bc4263c6ae82 |
comparison
equal
deleted
inserted
replaced
46:a0f677cfc679 | 47:3f4982759e55 |
---|---|
59 if (cx == NULL) { | 59 if (cx == NULL) { |
60 PyErr_SetString(PYM_error, "JS_NewContext() failed"); | 60 PyErr_SetString(PYM_error, "JS_NewContext() failed"); |
61 return NULL; | 61 return NULL; |
62 } | 62 } |
63 | 63 |
64 JS_SetOptions(cx, JSOPTION_VAROBJFIX); | 64 JS_SetOptions(cx, JSOPTION_VAROBJFIX | JSOPTION_DONT_REPORT_UNCAUGHT | |
65 JSOPTION_ATLINE | JSOPTION_STRICT); | |
65 JS_SetVersion(cx, JSVERSION_LATEST); | 66 JS_SetVersion(cx, JSVERSION_LATEST); |
66 | 67 |
67 PyObject *retval = (PyObject *) PYM_newJSContextObject(self, cx); | 68 PyObject *retval = (PyObject *) PYM_newJSContextObject(self, cx); |
68 | 69 |
69 if (retval == NULL) | 70 if (retval == NULL) |