sqlload_python_host/crossing/
errors.rs1use pyo3::PyErr;
2use sqlload::python_sources::errors::ReadError;
3
4#[derive(Debug)]
6pub enum CrossError {
7 Python(PyErr),
9 Data(String),
11 Http(ReadError),
13}
14
15impl std::fmt::Display for CrossError {
16 fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 match self {
18 Self::Python(error) => write!(formatter, "{error}"),
19 Self::Data(reason) => formatter.write_str(reason),
20 Self::Http(error) => write!(formatter, "{error}"),
21 }
22 }
23}