diff --git a/bin/src/modules/sqf.rs b/bin/src/modules/sqf.rs index 72788635..4b680797 100644 --- a/bin/src/modules/sqf.rs +++ b/bin/src/modules/sqf.rs @@ -75,7 +75,16 @@ impl Module for SQFCompiler { .map(|(addon, entry)| { trace!("sqf compiling {}", entry); let mut report = Report::new(); - let processed = Processor::run(entry).map_err(|(_, e)| e)?; + let processed = match Processor::run(entry).map_err(|(_, e)| e) { + Ok(p) => p, + Err(e) => { + if let hemtt_preprocessor::Error::Code(code) = e { + report.push(code); + return Ok(report); + } + return Err(e.into()); + } + }; for warning in processed.warnings() { report.push(warning.clone()); } diff --git a/libs/preprocessor/src/error.rs b/libs/preprocessor/src/error.rs index f680da8c..8e317aeb 100644 --- a/libs/preprocessor/src/error.rs +++ b/libs/preprocessor/src/error.rs @@ -8,7 +8,7 @@ use hemtt_workspace::reporting::Code; #[derive(thiserror::Error, Debug)] /// Errors that can occur during preprocessing pub enum Error { - #[error("Coded error")] + #[error("Coded error: {0:?}")] /// A coded error Code(Arc), #[error("IO Error: {0}")]