William,
Thanks for the response. Ironically, I was trying to figure out how to
change it in production.
I had a case where all of my tests passed but production was failing. It
turned out to be some strange hiera-fu but it would have been *much* easier
to be able to just get the file path directly.
Thanks,
Trevor
On Fri, Dec 13, 2013 at 2:22 AM, William Leese
<william.leese@meltwater.com>wrote:
> On Friday, December 13, 2013 5:30:26 AM UTC+9, Trevor Vaughan wrote:
>>
>> Does anyone know of a way to add a file-centric backtrace to the
validate
>> functions in the Stdlib?
>>
>> If you use a validator in a defined type, you end up not having any
idea
>> what actually threw the error.
>>
>
> Annoying indeed - had this issue quite often as well. What you want is to
> change this in your checkout of stdlib (modules/stdlib):
>
> For spec/unit/puppet/parser/functions/validate_*_spec.rb
>
> Change all:
> expect { scope.compiler.compile }.to raise_error(Puppet::ParseError
>
> to:
> expect { scope.compiler.compile }.to raise_error(Puppet::Error
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscribe@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/puppet-users/6fec71ff-df7c-4f66-a2a5-21be0e68d587%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvaughan@onyxpoint.com
-- This account not approved for unencrypted proprietary information --
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CANs%2BFoWndH6v%3Ddw4Wme1GfoJGwGBhtOjUFeWVWQ196T71O%2BrWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.