class Pione::Lang::StructuralError

StructuralError is raised when there is an unexpected expression in a model structure.

Public Class Methods

new(expected, pos) click to toggle source
# File lib/pione/lang/lang-exception.rb, line 11
def initialize(expected, pos)
  @expected = expected
  @pos = pos
end

Public Instance Methods

message() click to toggle source
# File lib/pione/lang/lang-exception.rb, line 16
def message
  name = @expected.name
  pos = @pos.format
  "the expression should be %s(%s)" % [name, pos]
end