resonance 1.0.1
Loading...
Searching...
No Matches
Py::TypeError Class Reference

Exception for a value of the wrong Python type, mirroring Python's TypeError. More...

#include <typeerror.h>

Inheritance diagram for Py::TypeError:
Collaboration diagram for Py::TypeError:

Public Member Functions

 TypeError (const HxStr &reason)
 Set the Python error indicator and become the thrown object.

Detailed Description

Exception for a value of the wrong Python type, mirroring Python's TypeError.

Its RTTI descriptor is at 0x008ef380. It has Py::StandardError at offset 0 as its one base. Its accessor is at 0x00148458, and the emission at 0x004c69e0 is an unreferenced copy.

The object is one byte and stores nothing. The reason string is pushed into the CPython error indicator by the constructor and is not retained, so a handler recovers it through PyErr_Fetch() rather than from the thrown object. Py::Object::validate() at 0x004c3d10 is the recovered throw site, and it proves both the constructor body below and the global that holds PyExc_TypeError.

Constructor & Destructor Documentation

◆ TypeError()

Py::TypeError::TypeError ( const HxStr & reason)
inline

Set the Python error indicator and become the thrown object.

Parameters
reasonText for the Python exception value. An empty string arrives at the interpreter as g_szEmptyString rather than as a null pointer.

The documentation for this class was generated from the following file: