Exception: Procore::Error

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

Overview

Generic / catch all error class. All other errors generated by the gem inherit from this class.

Direct Known Subclasses

OAuthError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, response: nil) ⇒ Error

Returns a new instance of Error.



11
12
13
14
15
16
# File 'lib/procore/errors.rb', line 11

def initialize(message, response: nil)
  @message = message
  @response = response

  super(message)
end

Instance Attribute Details

#messageObject (readonly)

Human readable error message.



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

def message
  @message
end

#responseObject (readonly)

A Response object which contains details about the request.



9
10
11
# File 'lib/procore/errors.rb', line 9

def response
  @response
end