Exception: PuppetRestClient::Error
- Inherits:
-
StandardError
- Object
- StandardError
- PuppetRestClient::Error
- Defined in:
- lib/puppet-rest/error.rb
Direct Known Subclasses
BadRequest, ClientError, Conflict, Forbidden, NotAcceptable, NotFound, Unauthorized
Defined Under Namespace
Classes: BadRequest, ClientError, Conflict, Forbidden, NotAcceptable, NotFound, Unauthorized
Instance Attribute Summary collapse
-
#http_headers ⇒ Object
readonly
Returns the value of attribute http_headers.
-
#wrapped_exception ⇒ Object
readonly
Returns the value of attribute wrapped_exception.
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(exception = $!, http_headers = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(exception = $!, http_headers = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 |
# File 'lib/puppet-rest/error.rb', line 5 def initialize(exception=$!, http_headers={}) @http_headers = http_headers if exception.respond_to?(:backtrace) super(exception.) @wrapped_exception = exception else super(exception.to_s) end end |
Instance Attribute Details
#http_headers ⇒ Object (readonly)
Returns the value of attribute http_headers.
3 4 5 |
# File 'lib/puppet-rest/error.rb', line 3 def http_headers @http_headers end |
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
3 4 5 |
# File 'lib/puppet-rest/error.rb', line 3 def wrapped_exception @wrapped_exception end |
Instance Method Details
#backtrace ⇒ Object
15 16 17 |
# File 'lib/puppet-rest/error.rb', line 15 def backtrace @wrapped_exception ? @wrapped_exception.backtrace : super end |