1 2 3 4 5 6 7 8
use crate::base::error::ServerStateError; use pyo3::{exceptions::PyOSError, PyErr}; impl std::convert::From<ServerStateError> for PyErr { fn from(err: ServerStateError) -> PyErr { PyOSError::new_err(err.to_string()) } }