Exception: DropboxError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/dropbox_sdk_v2.rb

Overview

This is the usual error raised on any Dropbox related Errors

Direct Known Subclasses

DropboxAuthError, DropboxNotModified

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, http_response = nil, user_error = nil) ⇒ DropboxError

Returns a new instance of DropboxError.



698
699
700
701
702
# File 'lib/dropbox_sdk_v2.rb', line 698

def initialize(error, http_response=nil, user_error=nil)
  @error = error
  @http_response = http_response
  @user_error = user_error
end

Instance Attribute Details

#errorObject

Returns the value of attribute error.



697
698
699
# File 'lib/dropbox_sdk_v2.rb', line 697

def error
  @error
end

#http_responseObject

Returns the value of attribute http_response.



697
698
699
# File 'lib/dropbox_sdk_v2.rb', line 697

def http_response
  @http_response
end

#user_errorObject

Returns the value of attribute user_error.



697
698
699
# File 'lib/dropbox_sdk_v2.rb', line 697

def user_error
  @user_error
end

Instance Method Details

#to_sObject



704
705
706
707
# File 'lib/dropbox_sdk_v2.rb', line 704

def to_s
  return "#{user_error} (#{error})" if user_error
  "#{error}"
end