utils.rs 164 Bytes
Newer Older
yongshk's avatar
yongshk committed
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:?}"))
}