Class: Puppet::Pops::Evaluator::Runtime3Support::ExceptionRaisingAcceptor Private

Inherits:
Validation::Acceptor show all
Defined in:
lib/puppet/pops/evaluator/runtime3_support.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

An acceptor of diagnostics that immediately raises an exception.

Instance Attribute Summary

Attributes inherited from Validation::Acceptor

#diagnostics, #error_count, #warning_count

Instance Method Summary collapse

Methods inherited from Validation::Acceptor

#errors, #errors?, #errors_and_warnings, #errors_or_warnings?, #ignored, #initialize, #prune, #warnings, #warnings?

Constructor Details

This class inherits a constructor from Puppet::Pops::Validation::Acceptor

Instance Method Details

#accept(diagnostic) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



517
518
519
520
521
522
523
524
525
526
527
# File 'lib/puppet/pops/evaluator/runtime3_support.rb', line 517

def accept(diagnostic)
  super
  IssueReporter.assert_and_report(self, {
    :message => "Evaluation Error:",
    :emit_warnings => true,  # log warnings
    :exception_class => Puppet::PreformattedError
  })
  if errors?
    raise ArgumentError, _("Internal Error: Configuration of runtime error handling wrong: should have raised exception")
  end
end