CIRCT 24.0.0git
Loading...
Searching...
No Matches
nanobind Namespace Reference

Namespaces

namespace  detail

Functions

nanobind::python_error raisePyError (PyObject *exc_class, const char *message)
 Raises a python exception with the given message.
nanobind::python_error raiseValueError (const char *message)
 Raises a value error with the given message.
nanobind::python_error raiseValueError (const std::string &message)
 Raises a value error with the given message.

Function Documentation

◆ raisePyError()

nanobind::python_error nanobind::raisePyError ( PyObject * exc_class,
const char * message )
inline

Raises a python exception with the given message.

Correct usage:

Definition at line 67 of file NanobindUtils.h.

Referenced by raiseValueError(), and raiseValueError().

◆ raiseValueError() [1/2]

nanobind::python_error nanobind::raiseValueError ( const char * message)
inline

Raises a value error with the given message.

Correct usage: throw RaiseValueError("Foobar'd");

Definition at line 76 of file NanobindUtils.h.

References raisePyError().

◆ raiseValueError() [2/2]

nanobind::python_error nanobind::raiseValueError ( const std::string & message)
inline

Raises a value error with the given message.

Correct usage: throw RaiseValueError(message);

Definition at line 83 of file NanobindUtils.h.

References raisePyError().