Sha256: 5c1ba7ba44bedf82c6e152fbdf5cd5b17b84d87152f98dbdc47478397533457d

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 Bytes

Contents

# ErrorMessages module contains different error messages
module ErrorMessages
  def unbalanced_brackets_error
    'error signaled: unbalanced brackets'
  end

  def unbalanced_quotes_error
    'error signaled: unbalanced quotes'
  end

  def arg_err_build(exp, got)
    'Incorrect number of arguments, expected ' + exp.to_s + ' got ' + got.to_s
  end

  def no_procedure_build(name)
    'No procedure found ' + name.to_s
  end

  def unbound_symbol_err(symbol)
    'Unbound symbol ' + symbol.to_s
  end

  def data_type_err(exp, got)
    'Invalid data type, expected ' + exp.to_s + ' got ' + got.to_s
  end
end

class SchemeException < RuntimeError
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lisp-interpreter-0.4.0 lib/lisp/interpreter/core/errors.rb