Logo ROOT  
Reference Guide
PyException.cxx
Go to the documentation of this file.
1// Bindings
2#include "CPyCppyy.h"
3#define CPYCPPYY_INTERNAL 1
5#undef CPYCPPYY_INTERNAL
6
7
8//______________________________________________________________________________
9// C++ exception for throwing python exceptions
10// ============================================
11// Purpose: A C++ exception class for throwing python exceptions
12// through C++ code.
13// Created: Apr, 2004, Scott Snyder, from the version in D0's python_util.
14//
15// Note: Don't be tempted to declare the virtual functions defined here
16// as inline.
17// If you do, you may not be able to properly throw these
18// exceptions across shared libraries.
19
20
21//- constructors/destructor --------------------------------------------------
23{
24// default constructor
25}
26
28{
29// destructor
30}
31
32
33//- public members -----------------------------------------------------------
34const char* CPyCppyy::PyException::what() const noexcept
35{
36// Return reason for throwing this exception: a python exception was raised.
37 return "python exception";
38}
virtual const char * what() const noexcept
Definition: PyException.cxx:34
virtual ~PyException() noexcept
Definition: PyException.cxx:27