Sure, I'll try that out. Travelling to a conference atm though.
On 11 Sep 2013 14:02, "Adrien Thebo" <notifications@github.com> wrote:

> In lib/hiera/filecache.rb:
>
> > @@ -32,8 +32,13 @@ def read(path, expected_type=nil, default=nil)
> >            begin
> >              @cache[path][:data] = yield(File.read(path))
> >            rescue => e
> > -            Hiera.debug("Reading data from %s failed: %s: %S" % [path, e.class, e.to_s])
> > -            @cache[path][:data] = default
> > +            error = "Reading data from %s failed: %s: %s" % [path, e.class, e.to_s]
> > +            if default.nil?
> > +              raise error
>
> Raising a new exception will mask the backtrace, I think that raise
> e.class, error, e.backtrace will fix that.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/puppetlabs/hiera/pull/151/files#r6301593>
> .
>