Exception: AMEE::BadData

Inherits:
Exception
  • Object
show all
Defined in:
lib/amee/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ BadData

Returns a new instance of BadData.



10
11
12
13
14
# File 'lib/amee/exceptions.rb', line 10

def initialize(msg = nil)
  super(msg)
  @msg = msg
  @last_err = $!
end

Instance Method Details

#to_sObject



15
16
17
18
19
20
21
# File 'lib/amee/exceptions.rb', line 15

def to_s
  if @last_err
    ([@msg, @last_err.message]+@last_err.backtrace).join "\n"
  else
    super
  end
end