Exception: Github::Error::GithubError

Inherits:
StandardError
  • Object
show all
Extended by:
DescendantsTracker
Defined in:
lib/github_api/error.rb

Direct Known Subclasses

ClientError, ServiceError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = $!) ⇒ GithubError

Initialize a new Github error object.



14
15
16
17
18
19
20
21
# File 'lib/github_api/error.rb', line 14

def initialize(message = $!)
  if message.respond_to?(:backtrace)
    super(message.message)
    @response_message = message
  else
    super(message.to_s)
  end
end

Instance Attribute Details

#response_headersObject (readonly)

Returns the value of attribute response_headers.



10
11
12
# File 'lib/github_api/error.rb', line 10

def response_headers
  @response_headers
end

#response_messageObject (readonly)

Returns the value of attribute response_message.



10
11
12
# File 'lib/github_api/error.rb', line 10

def response_message
  @response_message
end

Instance Method Details

#backtraceObject



23
24
25
26
27
28
29
# File 'lib/github_api/error.rb', line 23

def backtrace
  if @response_message.respond_to?(:backtrace)
    @response_message.backtrace
  else
    super
  end
end
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy