Macro rigetti_pyo3::wrap_error
source · macro_rules! wrap_error { ($name: ident ($inner: ty)$(;)?) => { ... }; }
Expand description
Wraps an external error type in a newtype struct so it can be used with py_wrap_error.
§Implements
§Example
use rigetti_pyo3::{wrap_error, py_wrap_error};
use rigetti_pyo3::pyo3::exceptions::PyRuntimeError;
wrap_error!{
RustIOError(std::io::Error);
}
py_wrap_error!(errors, RustIOError, IOError, PyRuntimeError);