# File lib/puppet/parser/ast.rb, line 72 72: def safeevaluate(*options) 73: # We duplicate code here, rather than using exceptwrap, because this 74: # is called so many times during parsing. 75: begin 76: return self.evaluate(*options) 77: rescue Puppet::Error => detail 78: raise adderrorcontext(detail) 79: rescue => detail 80: error = Puppet::Error.new(detail.to_s) 81: # We can't use self.fail here because it always expects strings, 82: # not exceptions. 83: raise adderrorcontext(error, detail) 84: end 85: end