1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
pub type Error = lambda_runtime_api_client::Error;
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ExtensionError {
err: String,
}
impl ExtensionError {
pub(crate) fn boxed<T: Into<String>>(str: T) -> Box<ExtensionError> {
Box::new(ExtensionError { err: str.into() })
}
}
impl std::fmt::Display for ExtensionError {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.err.fmt(f)
}
}
impl std::error::Error for ExtensionError {}