Exception: Idl::AstNode::TypeError
- Inherits:
-
StandardError
- Object
- StandardError
- Idl::AstNode::TypeError
- Defined in:
- lib/idl/ast.rb
Overview
error that is thrown when compilation reveals a type error
Instance Attribute Summary collapse
-
#bt ⇒ Array<String>
readonly
The backtrace starting from the ‘type_error’ call site.
-
#what ⇒ String
readonly
The error message.
Instance Method Summary collapse
-
#initialize(what) ⇒ TypeError
constructor
A new instance of TypeError.
Constructor Details
#initialize(what) ⇒ TypeError
Returns a new instance of TypeError.
90 91 92 93 94 95 96 97 98 99 |
# File 'lib/idl/ast.rb', line 90 def initialize(what) super(what) @what = what @bt = Kernel.caller # shift twice to get to the call site of 'type_error' @bt.shift @bt.shift end |
Instance Attribute Details
#bt ⇒ Array<String> (readonly)
The backtrace starting from the ‘type_error’ call site
Note, this will be different (truncated) from #backtrace
87 88 89 |
# File 'lib/idl/ast.rb', line 87 def bt @bt end |
#what ⇒ String (readonly)
Returns The error message.
80 81 82 |
# File 'lib/idl/ast.rb', line 80 def what @what end |