Exception: FileConvert::Exception::ConnectionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/file_convert/exception.rb

Instance Method Summary collapse

Constructor Details

#initialize(result, action) ⇒ ConnectionError

Returns a new instance of ConnectionError.



19
20
21
22
23
24
# File 'lib/file_convert/exception.rb', line 19

def initialize(result, action)
  super()
  @result = result
  @error_message = result.error_message
  @action = action
end

Instance Method Details

#messageObject



26
27
28
29
30
31
# File 'lib/file_convert/exception.rb', line 26

def message
  ''"
    An error occured while #{@action}: #{@error_message}.
    Body of request was: #{@result.body}
  "''
end