1
1
mirror of https://github.com/tweag/nickel.git synced 2024-09-21 08:31:15 +03:00

update docstring

This commit is contained in:
Guillaume Desforges 2023-01-18 22:48:01 +01:00
parent 54e7cad356
commit f6b489229f

View File

@ -11,7 +11,7 @@ use pyo3::{create_exception, exceptions::PyException, prelude::*};
create_exception!(pyckel, NickelException, PyException);
/// Turn a Nickel (Rust) error into a NickelException (Python)
/// Turn an internal Nickel error into a PyErr with a fancy diagnostic message
fn error_to_exception<E: Into<Error>, EC: Cache>(error: E, program: &mut Program<EC>) -> PyErr {
NickelException::new_err(program.report_as_str(error.into()))
}