Mercurial > public > mercurial-scm > hg-stable
view rust/hg-pyo3/src/exceptions.rs @ 52439:20c0472b2ab7
rust-pyo3: defining GraphError
This pretty much parallels the way in works with `cpython`. A warning, though:
this new `pyo3_rustext.GraphError` is not the same as `rustext.GraphError`, yet
both subclass `ValueError`.
author | Georges Racinet <georges.racinet@cloudcrane.io> |
---|---|
date | Sat, 30 Nov 2024 20:27:11 +0100 |
parents | |
children | 6e8ba52857df |
line wrap: on
line source
use pyo3::create_exception; use pyo3::exceptions::PyValueError; create_exception!(pyo3_rustext, GraphError, PyValueError);