pub fn err_with_location(
py: Python<'_>,
err: PyErr,
file: &str,
line: u32,
column: u32,
) -> PyErr
Expand description
Utility function to add a traceback with the error’s file
, line
, and
column
location information to the err
.
This function may be used when implementing AnyErrorToPyErr
or
MapErrorToPyErr
to pythonize any available error location information.