PythonMonkey   v1.0.0 (dev)
Loading...
Searching...
No Matches
ExceptionType.hh
Go to the documentation of this file.
1
11#ifndef PythonMonkey_ExceptionType_
12#define PythonMonkey_ExceptionType_
13
14#include <jsapi.h>
15
16#include <Python.h>
17
22public:
31 static PyObject *getPyObject(JSContext *cx, JS::HandleObject error);
32
40 static JSObject *toJsError(JSContext *cx, PyObject *exceptionValue, PyObject *traceBack);
41};
42
43#endif
This struct represents a Python Exception object from the corresponding JS Error object.
Definition ExceptionType.hh:21
static JSObject * toJsError(JSContext *cx, PyObject *exceptionValue, PyObject *traceBack)
Convert a python Exception object to a JS Error object.
Definition ExceptionType.cc:83
static PyObject * getPyObject(JSContext *cx, JS::HandleObject error)
Construct a new SpiderMonkeyError from the JS Error object.
Definition ExceptionType.cc:25