| 46 m.add_class::<super::experiments::Problem>()?; |
46 m.add_class::<super::experiments::Problem>()?; |
| 47 m.add_class::<super::experiments::RegTermPy>()?; |
47 m.add_class::<super::experiments::RegTermPy>()?; |
| 48 Ok(()) |
48 Ok(()) |
| 49 } |
49 } |
| 50 |
50 |
| 51 /// Converts a [`PyErr`] error in a [`Results`] error into a string with traceback. |
51 /// Converts a [`pyo3::PyErr`] error in a [`pyo3::PyResult`] into a string with traceback. |
| 52 pub fn process_error<'py, T>(fname: &str, py: Python<'py>, res: PyResult<T>) -> DynResult<T> |
52 pub fn process_error<'py, T>(fname: &str, py: Python<'py>, res: PyResult<T>) -> DynResult<T> |
| 53 where |
53 where |
| 54 { |
54 { |
| 55 match res { |
55 match res { |
| 56 Ok(res) => Ok(res), |
56 Ok(res) => Ok(res), |