Skip to content

Commit

Permalink
export ModuleError and RuntimeError for downstream usage
Browse files Browse the repository at this point in the history
Signed-off-by: Gregory Hill <[email protected]>
  • Loading branch information
gregdhill committed Mar 12, 2021
1 parent 568d6ea commit cfaf708
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ mod runtimes;
mod subscription;

pub use crate::{
error::Error,
error::{
Error,
ModuleError,
RuntimeError,
},
events::{
EventTypeRegistry,
EventsDecoder,
Expand Down

0 comments on commit cfaf708

Please sign in to comment.