μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
test_exceptions.h
Go to the documentation of this file.
1#pragma once
2#include "pybind11_tests.h"
3
4#include <stdexcept>
5
6// shared exceptions for cross_module_tests
7
8class PYBIND11_EXPORT_EXCEPTION shared_exception : public pybind11::builtin_exception {
9public:
10 using builtin_exception::builtin_exception;
12 void set_error() const override { PyErr_SetString(PyExc_RuntimeError, what()); }
13};
void set_error() const override
#define PYBIND11_EXPORT_EXCEPTION
Definition: common.h:106