Exception: Idl::AstNode::TypeError

Inherits:
StandardError
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/idlc/ast.rb

Overview

error that is thrown when compilation reveals a type error

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(what) ⇒ TypeError

Returns a new instance of TypeError.



119
120
121
122
123
124
125
126
127
128
# File 'lib/idlc/ast.rb', line 119

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

#btObject (readonly)

Returns the value of attribute bt.



115
116
117
# File 'lib/idlc/ast.rb', line 115

def bt
  @bt
end

#whatObject (readonly)

Returns the value of attribute what.



107
108
109
# File 'lib/idlc/ast.rb', line 107

def what
  @what
end