diff options
author | Bert Belder <bertbelder@gmail.com> | 2020-08-26 18:20:22 +0200 |
---|---|---|
committer | Bert Belder <bertbelder@gmail.com> | 2020-08-26 18:48:04 +0200 |
commit | c8b5f1e454d5cb2bd7580bbe0ac4fa83237e9f41 (patch) | |
tree | 6982e7cd91eb17e85c89658bc078947b6a4e8c04 /cli/errors.rs | |
parent | 765235341b6075bcf64d8ebcdb61e350d251514d (diff) |
Simplify ErrBox-to-class mapping & hook it up to core json ops (#7195)
Diffstat (limited to 'cli/errors.rs')
-rw-r--r-- | cli/errors.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/cli/errors.rs b/cli/errors.rs index 6b53ac8d0..2d7bb1cd6 100644 --- a/cli/errors.rs +++ b/cli/errors.rs @@ -228,9 +228,3 @@ pub fn get_error_class(e: &ErrBox) -> &'static str { panic!("ErrBox '{}' contains boxed error of unknown type", e); }) } - -pub fn rust_err_to_json(error: &ErrBox) -> Box<[u8]> { - let error_value = - json!({ "kind": get_error_class(error), "message": error.to_string()}); - serde_json::to_vec(&error_value).unwrap().into_boxed_slice() -} |