Skip to content

Commit 961d830

Browse files
Impl std::error::Error for error types (#205)
1 parent 4f06514 commit 961d830

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/jiter/src/errors.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,8 @@ impl std::fmt::Display for JsonError {
155155
}
156156
}
157157

158+
impl std::error::Error for JsonError {}
159+
158160
macro_rules! json_error {
159161
($error_type:ident, $index:expr) => {
160162
crate::errors::JsonError::new(crate::errors::JsonErrorType::$error_type, $index)
@@ -231,6 +233,8 @@ impl std::fmt::Display for JiterError {
231233
}
232234
}
233235

236+
impl std::error::Error for JiterError {}
237+
234238
impl JiterError {
235239
pub(crate) fn new(error_type: JiterErrorType, index: usize) -> Self {
236240
Self { error_type, index }

0 commit comments

Comments
 (0)