Exception: VaultApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- VaultApi::Error
- Defined in:
- lib/vault_api/error.rb
Direct Known Subclasses
AuthorizationError, BadRequestError, ConnectionError, NotFoundError, ParseError, RecordNotFoundError, SSLError, TimeoutError, UnauthorizedError
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(e) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
Constructor Details
#initialize(e) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/vault_api/error.rb', line 5 def initialize(e) @wrapped_exception = nil if e.respond_to?(:backtrace) super(e.) @wrapped_exception = e else super(e.to_s) end end |
Instance Method Details
#backtrace ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/vault_api/error.rb', line 16 def backtrace if @wrapped_exception @wrapped_exception.backtrace else super end end |
#inspect ⇒ Object
24 25 26 27 28 29 |
# File 'lib/vault_api/error.rb', line 24 def inspect inner = '' inner << " wrapped=#{@wrapped_exception.inspect}" if @wrapped_exception inner << " #{super}" if inner.empty? %(#<#{self.class}#{inner}>) end |