Exception: Btape::ScriptError
- Defined in:
- lib/btape/error.rb
Overview
Raised for a problem in the .tape script itself, carrying the line number so the CLI can report where the script went wrong.
Instance Attribute Summary collapse
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
Instance Method Summary collapse
-
#initialize(line_number, message) ⇒ ScriptError
constructor
A new instance of ScriptError.
Constructor Details
#initialize(line_number, message) ⇒ ScriptError
Returns a new instance of ScriptError.
15 16 17 18 |
# File 'lib/btape/error.rb', line 15 def initialize(line_number, ) @line_number = line_number super("line #{line_number}: #{}") end |
Instance Attribute Details
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number.
13 14 15 |
# File 'lib/btape/error.rb', line 13 def line_number @line_number end |