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.
133 134 135 136 137 138 |
# File 'lib/idl/ast.rb', line 133 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.
131 132 133 |
# File 'lib/idl/ast.rb', line 131 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
131 132 133 |
# File 'lib/idl/ast.rb', line 131 def lineno @lineno end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
131 132 133 |
# File 'lib/idl/ast.rb', line 131 def reason @reason end |
Instance Method Details
#message ⇒ Object
142 143 144 145 146 147 148 149 |
# File 'lib/idl/ast.rb', line 142 def <<~WHAT In file #{file} On line #{lineno} A value error occurred #{reason} WHAT end |
#what ⇒ Object
140 |
# File 'lib/idl/ast.rb', line 140 def what = |