Exception: BusinessFlow::ClusterLock::ClassMethods::LockFailure
- Inherits:
-
StandardError
- Object
- StandardError
- BusinessFlow::ClusterLock::ClassMethods::LockFailure
- Defined in:
- lib/business_flow/cluster_lock.rb
Overview
Error raised when there is an internal issue with acquiring a lock.
Instance Attribute Summary collapse
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
Instance Method Summary collapse
- #add_to(flow) ⇒ Object
-
#initialize(error_type, message) ⇒ LockFailure
constructor
A new instance of LockFailure.
Constructor Details
#initialize(error_type, message) ⇒ LockFailure
Returns a new instance of LockFailure.
58 59 60 61 |
# File 'lib/business_flow/cluster_lock.rb', line 58 def initialize(error_type, ) @error_type = error_type super() end |
Instance Attribute Details
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
56 57 58 |
# File 'lib/business_flow/cluster_lock.rb', line 56 def error_type @error_type end |
Instance Method Details
#add_to(flow) ⇒ Object
63 64 65 66 67 68 69 |
# File 'lib/business_flow/cluster_lock.rb', line 63 def add_to(flow) errors = flow.errors unless errors.key?(:cluster_lock) BusinessFlow.add_error(errors, :cluster_lock, error_type, ) end flow end |