Open PierreR opened 8 years ago
I don't think it's easy to fix it properly. This is one of the most tangled parts of the code, as the "current position" is kept in the state monad. IIRC, it used to work as you expected, but then another error message was not at the right place ... I'll look into it anyway.
It is neither urgent or such a big deal for me.
Given a file called 'saltmaster.pp' containing these lines:
where I simulate an error ('evironments
instead of
environment`), I receive the following error message:Is is rather an inconvenience that the
sourcePos
describes the error as happening in the including class rather than where the error is actually happening.Is there a quick fix for this ?
As a bit of context, I have created a shake file for checking all my catalogues. In case of error, I ideally would set the shake
need
(the dependencies) onto the culprit file only. The first 'headache' with this is thatlanguage-puppet
does not expose a structure Error type, just aDoc
PrettyError. Then the second issue is the returnSourcePos
as explain above.