Exception: Idl::AstNode::InternalError
- Inherits:
-
StandardError
- Object
- StandardError
- Idl::AstNode::InternalError
- Defined in:
- lib/idl/ast.rb
Overview
error that is thrown when the compiler hits an unrecoverable error (that needs fixed!)
Instance Attribute Summary collapse
-
#bt ⇒ Array<String>
readonly
The backtrace starting from the ‘internal_error’ call site.
-
#what ⇒ String
readonly
The error message.
Instance Method Summary collapse
-
#initialize(what) ⇒ InternalError
constructor
A new instance of InternalError.
Constructor Details
#initialize(what) ⇒ InternalError
Returns a new instance of InternalError.
114 115 116 117 118 119 120 121 122 123 |
# File 'lib/idl/ast.rb', line 114 def initialize(what) super(what) @what = what @bt = Kernel.caller # shift twice to get to the call site of 'internal_error' @bt.shift @bt.shift end |
Instance Attribute Details
#bt ⇒ Array<String> (readonly)
The backtrace starting from the ‘internal_error’ call site
Note, this will be different (truncated) from #backtrace
112 113 114 |
# File 'lib/idl/ast.rb', line 112 def bt @bt end |
#what ⇒ String (readonly)
Returns The error message.
105 106 107 |
# File 'lib/idl/ast.rb', line 105 def what @what end |