raphtory-api 0.17.0

Raphtory common interface and APIs
Documentation
1
2
3
4
5
6
7
8
9
10
use pyo3::{exceptions::PyException, PyErr};
use std::error::Error;

pub fn adapt_err_value<E>(err: &E) -> PyErr
where
    E: Error + ?Sized,
{
    let error_log = display_error_chain::DisplayErrorChain::new(err).to_string();
    PyException::new_err(error_log)
}