Exception: RubyPi::ProviderError
- Defined in:
- lib/ruby_pi/errors.rb
Overview
Raised when a provider-specific error occurs that does not map to one of the more specific error types. Includes the provider name for context.
Instance Attribute Summary collapse
-
#provider ⇒ Symbol, String
readonly
The name of the provider that raised the error.
Instance Method Summary collapse
-
#initialize(message = nil, provider: nil) ⇒ ProviderError
constructor
A new instance of ProviderError.
Constructor Details
#initialize(message = nil, provider: nil) ⇒ ProviderError
Returns a new instance of ProviderError.
83 84 85 86 |
# File 'lib/ruby_pi/errors.rb', line 83 def initialize( = nil, provider: nil) @provider = provider super( || "Provider error from #{provider}") end |
Instance Attribute Details
#provider ⇒ Symbol, String (readonly)
Returns the name of the provider that raised the error.
79 80 81 |
# File 'lib/ruby_pi/errors.rb', line 79 def provider @provider end |