1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use aws_smithy_types::date_time::{ConversionError, DateTimeParseError};
use pyo3::{exceptions::PyException, PyErr};
use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("DateTimeConversion: {0}")]
DateTimeConversion(#[from] ConversionError),
#[error("DateTimeParse: {0}")]
DateTimeParse(#[from] DateTimeParseError),
}
impl From<Error> for PyErr {
fn from(other: Error) -> PyErr {
PyException::new_err(other.to_string())
}
}