Exception: YANAPI::ExternalError

Inherits:
Error
  • Object
show all
Defined in:
lib/yanapi/error.rb

Overview

A technical error accessing the server, may be caught and handled with a new attempt.

Instance Method Summary collapse

Constructor Details

#initialize(arg) ⇒ ExternalError

Returns a new instance of ExternalError.



23
24
25
26
27
28
29
30
31
# File 'lib/yanapi/error.rb', line 23

def initialize(arg)
  msg = "Some external error occured:\n"
  if arg.kind_of?(String)
    msg += arg
  else
    msg += "#{exception.class}: #{exception.message}"        
  end
  super(msg)
end