Exception: PFS::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pfs/error.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ Error

Returns a new instance of Error.



7
8
9
10
11
12
# File 'lib/pfs/error.rb', line 7

def initialize(error)
  @wrapped_error = error
  @response = @wrapped_error.response if @wrapped_error.respond_to?(:response)
  @status = structured_response[:status]
  super(error_message)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/pfs/error.rb', line 5

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/pfs/error.rb', line 5

def status
  @status
end

#wrapped_errorObject (readonly)

Returns the value of attribute wrapped_error.



5
6
7
# File 'lib/pfs/error.rb', line 5

def wrapped_error
  @wrapped_error
end