PythonMonkey   v1.1.1 (dev)
Loading...
Searching...
No Matches
ExceptionType Struct Reference

This struct represents a Python Exception object from the corresponding JS Error object. More...

#include <ExceptionType.hh>

Static Public Member Functions

static PyObject * getPyObject (JSContext *cx, JS::HandleObject error)
 Construct a new SpiderMonkeyError from the JS Error object.
 
static JSObject * toJsError (JSContext *cx, PyObject *exceptionValue, PyObject *traceBack)
 Convert a python Exception object to a JS Error object.
 

Detailed Description

This struct represents a Python Exception object from the corresponding JS Error object.

Member Function Documentation

◆ getPyObject()

PyObject * ExceptionType::getPyObject ( JSContext *  cx,
JS::HandleObject  error 
)
static

Construct a new SpiderMonkeyError from the JS Error object.

Parameters
cx- javascript context pointer
error- JS Error object to be converted
Returns
PyObject* pointer to the resulting PyObject

◆ toJsError()

JSObject * ExceptionType::toJsError ( JSContext *  cx,
PyObject *  exceptionValue,
PyObject *  traceBack 
)
static

Convert a python Exception object to a JS Error object.

Parameters
cx- javascript context pointer
exceptionValue- Exception object pointer, cannot be NULL
traceBack- Exception traceback pointer, can be NULL

The documentation for this struct was generated from the following files: