diff options
Diffstat (limited to 'src/makefile/input.rs')
-rw-r--r-- | src/makefile/input.rs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs index 3707aef..316968f 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -331,11 +331,15 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { Err(err) => return Some((line_number, Err(err))), }; if let Some(line) = cond_line { - let action = line.action( - self.conditional_stack.last(), - |name| self.macros.is_defined(name), - |t| self.expand_macros(t), - ); + let action = line + .action( + self.conditional_stack.last(), + |name| self.macros.is_defined(name), + |t| self.expand_macros(t), + ) + .wrap_err_with(|| { + format!("while applying conditional on line {}", line_number) + }); let action = match action { Ok(x) => x, Err(err) => return Some((line_number, Err(err))), |