From b37d8ecd5a05d0913e5d0fce346bdc37074d71e1 Mon Sep 17 00:00:00 2001 From: Greg Hill Date: Mon, 15 Mar 2021 09:26:55 +0000 Subject: [PATCH] export ModuleError and RuntimeError for downstream usage (#246) Signed-off-by: Gregory Hill --- src/error.rs | 2 ++ src/lib.rs | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 7e05ef2f38..377684384a 100644 --- a/src/error.rs +++ b/src/error.rs @@ -148,6 +148,8 @@ impl RuntimeError { #[derive(Clone, Debug, Eq, Error, PartialEq)] #[error("{error} from {module}")] pub struct ModuleError { + /// The module where the error originated. pub module: String, + /// The actual error code. pub error: String, } diff --git a/src/lib.rs b/src/lib.rs index 76508a7e56..f1986cee7d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,7 +85,11 @@ mod runtimes; mod subscription; pub use crate::{ - error::Error, + error::{ + Error, + ModuleError, + RuntimeError, + }, events::{ EventTypeRegistry, EventsDecoder,