Exception: Hooksmith::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Hooksmith::Error
- Defined in:
- lib/hooksmith/errors.rb
Overview
Base error class for all Hooksmith errors.
All Hooksmith errors inherit from this class, allowing you to rescue all Hooksmith-related errors with a single rescue clause.
Direct Known Subclasses
ConfigurationError, InvalidPayloadError, MultipleProcessorsError, NoProcessorError, PersistenceError, ProcessorError, UnknownEventError, VerificationError
Instance Attribute Summary collapse
-
#event ⇒ String?
readonly
The event name.
-
#provider ⇒ String?
readonly
The provider name.
Instance Method Summary collapse
-
#initialize(message = nil, provider: nil, event: nil) ⇒ Error
constructor
Initializes a new Error.
Constructor Details
#initialize(message = nil, provider: nil, event: nil) ⇒ Error
Initializes a new Error.
27 28 29 30 31 |
# File 'lib/hooksmith/errors.rb', line 27 def initialize( = nil, provider: nil, event: nil) @provider = provider&.to_s @event = event&.to_s super() end |
Instance Attribute Details
#event ⇒ String? (readonly)
Returns the event name.
20 21 22 |
# File 'lib/hooksmith/errors.rb', line 20 def event @event end |
#provider ⇒ String? (readonly)
Returns the provider name.
18 19 20 |
# File 'lib/hooksmith/errors.rb', line 18 def provider @provider end |