summaryrefslogtreecommitdiff
path: root/src/macro_processor/error.rs
diff options
context:
space:
mode:
authorQrius <[email protected]>2024-09-26 00:11:05 +0200
committerQrius <[email protected]>2024-09-26 00:11:05 +0200
commitfce39a1c9a44d4a7eb2234f5d15b86d1c3177ffa (patch)
tree8582ef41441a007fb5d59d71b6d8ed60b2696853 /src/macro_processor/error.rs
parentf8df856d45acb619ebc7766b17bded03bac8d851 (diff)
downloadskaldpress-fce39a1c9a44d4a7eb2234f5d15b86d1c3177ffa.tar.gz
skaldpress-fce39a1c9a44d4a7eb2234f5d15b86d1c3177ffa.zip
Do a bunch of QOL things, add some skaldpress specific macros, add
second run, etc
Diffstat (limited to 'src/macro_processor/error.rs')
-rw-r--r--src/macro_processor/error.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/macro_processor/error.rs b/src/macro_processor/error.rs
index 074a8ef..cd94c4d 100644
--- a/src/macro_processor/error.rs
+++ b/src/macro_processor/error.rs
@@ -5,6 +5,7 @@ use std::fmt;
pub enum SMPError {
IncludeError(u8, std::io::Error, String),
ShellCommandError(u8, Box<dyn Error>),
+ UnknownError(u8, Option<Box<dyn Error>>),
}
impl fmt::Display for SMPError {
@@ -16,6 +17,13 @@ impl fmt::Display for SMPError {
SMPError::ShellCommandError(code, e) => {
write!(f, "[SMP{}] Error running shell command \"{:#?}\"", code, e)
}
+ SMPError::UnknownError(code, e) => {
+ write!(
+ f,
+ "[SMP{}] Unknown macro processing error occurred \"{:#?}\"",
+ code, e
+ )
+ }
}
}
}