summaryrefslogtreecommitdiff
path: root/candle-pyo3/src/utils.rs
blob: ad0a76a58f1fd68bb22ebe26718ad1d12bfadb84 (plain)
1
2
3
4
5
6
use pyo3::exceptions::PyValueError;
use pyo3::prelude::*;

pub fn wrap_err(err: ::candle::Error) -> PyErr {
    PyErr::new::<PyValueError, _>(format!("{err:?}"))
}