Exception: Pione::Lang::LangTypeError
- Inherits:
-
StandardError
- Object
- StandardError
- Pione::Lang::LangTypeError
- Defined in:
- lib/pione/lang/lang-exception.rb
Overview
LangTypeError represents type mismatch error in PIONE language.
Instance Method Summary collapse
-
#initialize(obj, type, env) ⇒ LangTypeError
constructor
A new instance of LangTypeError.
- #message ⇒ Object
Constructor Details
#initialize(obj, type, env) ⇒ LangTypeError
Returns a new instance of LangTypeError.
159 160 161 162 163 |
# File 'lib/pione/lang/lang-exception.rb', line 159 def initialize(obj, type, env) @obj = obj @type = type @env = env end |
Instance Method Details
#message ⇒ Object
165 166 167 168 169 170 171 172 173 |
# File 'lib/pione/lang/lang-exception.rb', line 165 def args = [ @type.name, @obj.pione_type(env).name, @obj.line, @obj.column ] "expected %s, but got %s(line: %s, column: %s)" % args end |