Exception: Idl::AstNode::ValueError
- Inherits:
-
StandardError
- Object
- StandardError
- Idl::AstNode::ValueError
- Defined in:
- lib/idl/ast.rb
Overview
exception type raised when the value of IDL code is requested (via node.value(…)) but cannot be provided because some part the code isn’t known at compile time
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(lineno, file, reason) ⇒ ValueError
constructor
A new instance of ValueError.
- #message ⇒ Object
- #what ⇒ Object
Constructor Details
#initialize(lineno, file, reason) ⇒ ValueError
Returns a new instance of ValueError.
131 132 133 134 135 136 |
# File 'lib/idl/ast.rb', line 131 def initialize(lineno, file, reason) super(reason) @lineno = lineno @file = file @reason = reason end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
129 130 131 |
# File 'lib/idl/ast.rb', line 129 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
129 130 131 |
# File 'lib/idl/ast.rb', line 129 def lineno @lineno end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
129 130 131 |
# File 'lib/idl/ast.rb', line 129 def reason @reason end |
Instance Method Details
#message ⇒ Object
140 141 142 143 144 145 146 147 |
# File 'lib/idl/ast.rb', line 140 def <<~WHAT In file #{file} On line #{lineno} A value error occured #{reason} WHAT end |
#what ⇒ Object
138 |
# File 'lib/idl/ast.rb', line 138 def what = |