Exception: PuppetX::Puppetlabs::Swagger::PrefetchError
- Defined in:
- lib/puppet_x/puppetlabs/swagger/prefetch_error.rb
Overview
We purposefully inherit from Exception here due to PUP-3656 If we throw something based on StandardError prior to Puppet 4 the exception will prevent the prefetch, but the provider will continue to run with incorrect data.
Instance Method Summary collapse
-
#initialize(type, exception = nil) ⇒ PrefetchError
constructor
A new instance of PrefetchError.
- #to_s ⇒ Object
Constructor Details
#initialize(type, exception = nil) ⇒ PrefetchError
Returns a new instance of PrefetchError.
9 10 11 12 |
# File 'lib/puppet_x/puppetlabs/swagger/prefetch_error.rb', line 9 def initialize(type, exception=nil) @type = type @exception = exception end |
Instance Method Details
#to_s ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/puppet_x/puppetlabs/swagger/prefetch_error.rb', line 14 def to_s """Puppet detected a problem with the information returned from the service when accessing #{@type}. The specific error was: #{@exception.} #{@exception.backtrace.join("\n")} """ end |