Loading...
Searching...
No Matches
TfPyRaiseOnError< Base > Class Template Reference

A boost.python call policy class which, when applied to a wrapped function, will create an error mark before calling the function, and check that error mark after the function has completed. More...

#include <pyError.h>

Inherits default_call_policies.

Public Types

typedef ErrorMarkAndArgs< typename Base::argument_package > argument_package
 

Public Member Functions

 TfPyRaiseOnError ()
 Default constructor.
 
bool precall (argument_package const &a)
 
PyObject * postcall (argument_package const &a, PyObject *result)
 

Detailed Description

template<typename Base = boost::python::default_call_policies>
class TfPyRaiseOnError< Base >

A boost.python call policy class which, when applied to a wrapped function, will create an error mark before calling the function, and check that error mark after the function has completed.

If any TfErrors have occurred, they will be raised as python exceptions.

This facility does not need to be used by clients in general. It is only required for wrapped functions and methods that do not appear directly in an extension module. For instance, the map and sequence proxy objects use this, since they are created on the fly.

Definition at line 63 of file pyError.h.

Member Typedef Documentation

◆ argument_package

typedef ErrorMarkAndArgs<typename Base::argument_package> argument_package

Definition at line 84 of file pyError.h.

Constructor & Destructor Documentation

◆ TfPyRaiseOnError()

TfPyRaiseOnError ( )
inline

Default constructor.

Definition at line 87 of file pyError.h.

Member Function Documentation

◆ postcall()

PyObject * postcall ( argument_package const &  a,
PyObject *  result 
)
inline

Definition at line 95 of file pyError.h.

◆ precall()

bool precall ( argument_package const &  a)
inline

Definition at line 91 of file pyError.h.


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