diff options
Diffstat (limited to '')
-rw-r--r-- | src/errors.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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<ContextualError>), } +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<ContextualErrorKind>, |