From 6dad3eb1bf0cb3b36cdb3b312cca7caa91de2f57 Mon Sep 17 00:00:00 2001 From: boastful-squirrel Date: Mon, 22 Apr 2019 00:39:38 +0200 Subject: Properly log error + added render_error method --- src/errors.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/errors.rs') diff --git a/src/errors.rs b/src/errors.rs index f2d185e..2bf4130 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -50,6 +50,12 @@ pub enum ContextualErrorKind { ArchiveCreationError(String, Box), } +pub fn log_error_chain(description: String) { + for cause in description.lines() { + log::error!("{}", cause); + } +} + /// Based on https://boats.gitlab.io/failure/error-errorkind.html pub struct ContextualError { inner: Context, -- cgit v1.2.3