Exception: Ruby::Rego::EvaluationError
- Defined in:
- lib/ruby/rego/errors.rb
Overview
Error raised during evaluation.
Instance Attribute Summary collapse
-
#rule ⇒ Object?
readonly
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, rule: nil, location: nil) ⇒ EvaluationError
constructor
Create an evaluation error.
Methods inherited from Error
Constructor Details
#initialize(message, rule: nil, location: nil) ⇒ EvaluationError
Create an evaluation error.
129 130 131 132 133 134 |
# File 'lib/ruby/rego/errors.rb', line 129 def initialize(, rule: nil, location: nil) @rule = rule details = ErrorFormatting.format_details(rule: rule) composed = details.empty? ? : "#{} (#{details})" super(composed, location: location) end |
Instance Attribute Details
#rule ⇒ Object? (readonly)
122 123 124 |
# File 'lib/ruby/rego/errors.rb', line 122 def rule @rule end |