24 #ifndef PXR_BASE_TF_PY_ERROR_INTERNAL_H
25 #define PXR_BASE_TF_PY_ERROR_INTERNAL_H
29 #include "pxr/base/tf/api.h"
30 #include "pxr/base/tf/pyExceptionState.h"
31 #include <boost/python/handle.hpp>
32 #include <boost/python/object_fwd.hpp>
34 PXR_NAMESPACE_OPEN_SCOPE
36 enum Tf_PyExceptionErrorCode {
40 TF_API TfPyExceptionState Tf_PyFetchPythonExceptionState();
41 TF_API
void Tf_PyRestorePythonExceptionState(TfPyExceptionState state);
42 TF_API boost::python::handle<> Tf_PyGetErrorExceptionClass();
43 TF_API
void Tf_PySetErrorExceptionClass(boost::python::object
const &cls);
61 TfPyExceptionState _state;
64 PXR_NAMESPACE_CLOSE_SCOPE
66 #endif // PXR_BASE_TF_PY_ERROR_INTERNAL_H
RAII class to save and restore the Python exception state.