Exception: Btape::ScriptError

Inherits:
Error
  • Object
show all
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

Instance Method Summary collapse

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, message)
  @line_number = line_number
  super("line #{line_number}: #{message}")
end

Instance Attribute Details

#line_numberObject (readonly)

Returns the value of attribute line_number.



13
14
15
# File 'lib/btape/error.rb', line 13

def line_number
  @line_number
end