Class: Puppet::Pops::Evaluator::EvaluatorImpl

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet-debugserver/puppet_monkey_patches.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(target, scope) ⇒ Object



55
56
57
58
59
60
61
62
63
64
# File 'lib/puppet-debugserver/puppet_monkey_patches.rb', line 55

def evaluate(target, scope)
  PuppetDebugServer::PuppetDebugSession.instance.execute_hook(:hook_before_pops_evaluate, [self, target, scope])
  result = original_evaluate(target, scope)
  PuppetDebugServer::PuppetDebugSession.instance.execute_hook(:hook_after_pops_evaluate, [self, target, scope])
  result
rescue => e # rubocop:disable Style/RescueStandardError Any error could be thrown here
  # Emit non-Puppet related errors to the debug log. We shouldn't get any of these!
  PuppetDebugServer.log_message(:debug, "Error in Puppet::Pops::Evaluator::EvaluatorImpl.evaluate #{e}: #{e.backtrace}") unless e.is_a?(Puppet::Error)
  raise
end

#original_evaluateObject



53
# File 'lib/puppet-debugserver/puppet_monkey_patches.rb', line 53

alias original_evaluate evaluate