Exception: Pione::Lang::StructuralError
- Defined in:
- lib/pione/lang/lang-exception.rb
Overview
StructuralError is raised when there is an unexpected expression in a model structure.
Instance Method Summary collapse
-
#initialize(expected, pos) ⇒ StructuralError
constructor
A new instance of StructuralError.
- #message ⇒ Object
Constructor Details
#initialize(expected, pos) ⇒ StructuralError
Returns a new instance of StructuralError.
11 12 13 14 |
# File 'lib/pione/lang/lang-exception.rb', line 11 def initialize(expected, pos) @expected = expected @pos = pos end |
Instance Method Details
#message ⇒ Object
16 17 18 19 20 |
# File 'lib/pione/lang/lang-exception.rb', line 16 def name = @expected.name pos = @pos.format "the expression should be %s(%s)" % [name, pos] end |