Show More
@@ -0,0 +1,4 | |||
|
1 | use pyo3::create_exception; | |
|
2 | use pyo3::exceptions::PyValueError; | |
|
3 | ||
|
4 | create_exception!(pyo3_rustext, GraphError, PyValueError); |
@@ -1,6 +1,7 | |||
|
1 | 1 | use pyo3::prelude::*; |
|
2 | 2 | |
|
3 | 3 | mod dagops; |
|
4 | mod exceptions; | |
|
4 | 5 | mod util; |
|
5 | 6 | |
|
6 | 7 | #[pymodule] |
@@ -15,5 +16,6 fn pyo3_rustext(py: Python<'_>, m: &Boun | |||
|
15 | 16 | let dotted_name = format!("mercurial.{}", name); |
|
16 | 17 | |
|
17 | 18 | m.add_submodule(&dagops::init_module(py, &dotted_name)?)?; |
|
19 | m.add("GraphError", py.get_type::<exceptions::GraphError>())?; | |
|
18 | 20 | Ok(()) |
|
19 | 21 | } |
General Comments 0
You need to be logged in to leave comments.
Login now