Class: Confium::ThresholdError
- Inherits:
-
Error
- Object
- Error
- Confium::ThresholdError
- Defined in:
- lib/confium/errors/threshold_error.rb
Overview
Raised when a Shamir/threshold operation fails (insufficient shares, duplicate coordinates, etc.).
Instance Attribute Summary collapse
-
#have_count ⇒ Object
readonly
Returns the value of attribute have_count.
-
#need_count ⇒ Object
readonly
Returns the value of attribute need_count.
Instance Method Summary collapse
-
#initialize(message = nil, details_hash = nil, **kwargs) ⇒ ThresholdError
constructor
A new instance of ThresholdError.
Constructor Details
#initialize(message = nil, details_hash = nil, **kwargs) ⇒ ThresholdError
Returns a new instance of ThresholdError.
8 9 10 11 12 13 |
# File 'lib/confium/errors/threshold_error.rb', line 8 def initialize( = nil, details_hash = nil, **kwargs) , kwargs = Confium::Errors::Coerce.args(, details_hash, kwargs) @have_count = kwargs.delete(:have_count) @need_count = kwargs.delete(:need_count) super(, details: { have_count: @have_count, need_count: @need_count, **kwargs }) end |
Instance Attribute Details
#have_count ⇒ Object (readonly)
Returns the value of attribute have_count.
6 7 8 |
# File 'lib/confium/errors/threshold_error.rb', line 6 def have_count @have_count end |
#need_count ⇒ Object (readonly)
Returns the value of attribute need_count.
6 7 8 |
# File 'lib/confium/errors/threshold_error.rb', line 6 def need_count @need_count end |