Exception: Racecar::ErroneousStateError
- Inherits:
-
StandardError
- Object
- StandardError
- Racecar::ErroneousStateError
- Defined in:
- lib/racecar/erroneous_state_error.rb
Instance Attribute Summary collapse
-
#rdkafka_error ⇒ Object
readonly
Returns the value of attribute rdkafka_error.
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(rdkafka_error) ⇒ ErroneousStateError
constructor
A new instance of ErroneousStateError.
- #to_s ⇒ Object
Constructor Details
#initialize(rdkafka_error) ⇒ ErroneousStateError
Returns a new instance of ErroneousStateError.
14 15 16 17 18 |
# File 'lib/racecar/erroneous_state_error.rb', line 14 def initialize(rdkafka_error) raise rdkafka_error unless rdkafka_error.is_a?(Rdkafka::RdkafkaError) @rdkafka_error = rdkafka_error end |
Instance Attribute Details
#rdkafka_error ⇒ Object (readonly)
Returns the value of attribute rdkafka_error.
20 21 22 |
# File 'lib/racecar/erroneous_state_error.rb', line 20 def rdkafka_error @rdkafka_error end |
Instance Method Details
#code ⇒ Object
22 23 24 |
# File 'lib/racecar/erroneous_state_error.rb', line 22 def code @rdkafka_error.code end |
#to_s ⇒ Object
26 27 28 29 30 31 |
# File 'lib/racecar/erroneous_state_error.rb', line 26 def to_s <<~EOM Partition is no longer assigned to this consumer and the offset could not be stored for commit. #{@rdkafka_error.to_s} EOM end |