Exception: Lox::RunError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/loxby/helpers/errors.rb

Overview

A generic loxby error class raised when a runtime error is found.

Direct Known Subclasses

DividedByZeroError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token, message) ⇒ RunError

Returns a new instance of RunError.



13
14
15
16
# File 'lib/loxby/helpers/errors.rb', line 13

def initialize(token, message)
  super(message)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



11
12
13
# File 'lib/loxby/helpers/errors.rb', line 11

def token
  @token
end