diff options
Diffstat (limited to 'crates/shirabe/src/json/json_file.rs')
| -rw-r--r-- | crates/shirabe/src/json/json_file.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/shirabe/src/json/json_file.rs b/crates/shirabe/src/json/json_file.rs index 2d061ced..da6370e4 100644 --- a/crates/shirabe/src/json/json_file.rs +++ b/crates/shirabe/src/json/json_file.rs @@ -174,7 +174,13 @@ impl JsonFile { // TransportException keeps its message verbatim; any other exception is wrapped // with the "Could not read" prefix. if let Some(te) = e.catch::<TransportException>() { - return Err(RuntimeException::new(te.get_message().to_string()).into()); + let message = te.get_message().to_string(); + return Err(RuntimeException::with_code_and_previous( + message, + 0, + Some(std::sync::Arc::new(e)), + ) + .into()); } return Err(RuntimeException::new(format!( "Could not read {}\n\n{}", |
