Exception: Idl::AstNode::ValueError
- Inherits:
-
StandardError
- Object
- StandardError
- Idl::AstNode::ValueError
- Extended by:
- T::Sig
- Defined in:
- lib/idlc/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.
175 176 177 178 179 180 |
# File 'lib/idlc/ast.rb', line 175 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.
169 170 171 |
# File 'lib/idlc/ast.rb', line 169 def file @file end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
166 167 168 |
# File 'lib/idlc/ast.rb', line 166 def lineno @lineno end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
172 173 174 |
# File 'lib/idlc/ast.rb', line 172 def reason @reason end |
Instance Method Details
#message ⇒ Object
186 187 188 189 190 191 192 193 |
# File 'lib/idlc/ast.rb', line 186 def <<~WHAT In file #{file} On line #{lineno} A value error occurred #{reason} WHAT end |
#what ⇒ Object
183 |
# File 'lib/idlc/ast.rb', line 183 def what = |