wrap
pybind11
tests
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
8
class
PYBIND11_EXPORT_EXCEPTION
shared_exception
:
public
pybind11::builtin_exception {
9
public
:
10
using
builtin_exception::builtin_exception;
11
explicit
shared_exception
() :
shared_exception
(
""
) {}
12
void
set_error
()
const override
{
py::set_error
(PyExc_RuntimeError, what()); }
13
};
shared_exception::shared_exception
shared_exception()
Definition:
test_exceptions.h:11
shared_exception::set_error
void set_error() const override
Definition:
test_exceptions.h:12
PYBIND11_EXPORT_EXCEPTION
#define PYBIND11_EXPORT_EXCEPTION
Definition:
wrap/pybind11/include/pybind11/detail/common.h:171
shared_exception
Definition:
test_exceptions.h:8
set_error
void set_error(const handle &type, const char *message)
Definition:
pytypes.h:346
pybind11_tests.h
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:07:05