summaryrefslogtreecommitdiff
path: root/cli/errors.rs
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2020-08-26 18:20:22 +0200
committerBert Belder <bertbelder@gmail.com>2020-08-26 18:48:04 +0200
commitc8b5f1e454d5cb2bd7580bbe0ac4fa83237e9f41 (patch)
tree6982e7cd91eb17e85c89658bc078947b6a4e8c04 /cli/errors.rs
parent765235341b6075bcf64d8ebcdb61e350d251514d (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.rs6
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()
-}