Exception: Lingo::LingoError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/lingo/error.rb

Instance Method Summary collapse

Instance Method Details

#class_nameObject



31
32
33
# File 'lib/lingo/error.rb', line 31

def class_name
  klass.name.split('::').last
end

#error(msg = 'An error occurred') ⇒ Object



35
36
37
38
39
# File 'lib/lingo/error.rb', line 35

def error(msg = 'An error occurred')
  res = ["#{msg}: #{err} (#{err.class})"]
  res.concat(err.backtrace) if $VERBOSE
  res.join("\n. . . . ")
end