Exception: Dropbox::ClientError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dropbox/errors.rb

Overview

Thrown when Dropbox::Client encounters an error unrelated to the API.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil) ⇒ ClientError

Returns a new instance of ClientError.


16
17
18
# File 'lib/dropbox/errors.rb', line 16

def initialize(message=nil)
  @message = message
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message


6
7
8
# File 'lib/dropbox/errors.rb', line 6

def message
  @message
end

Class Method Details

.invalid_access_tokenObject


8
9
10
# File 'lib/dropbox/errors.rb', line 8

def self.invalid_access_token
  self.new("Invalid access token")
end

.unknown_response_type(str) ⇒ Object


12
13
14
# File 'lib/dropbox/errors.rb', line 12

def self.unknown_response_type(str)
  self.new("Unknown response type '#{str}'")
end

Instance Method Details

#to_sObject


20
21
22
# File 'lib/dropbox/errors.rb', line 20

def to_s
  @message.to_s
end