Exception: KubeMQ::CancellationError

Inherits:
Error
  • Object
show all
Defined in:
lib/kubemq/errors.rb

Overview

Raised when an operation is cooperatively cancelled via CancellationToken.

Not retryable — cancellation is intentional.

See Also:

Instance Attribute Summary

Attributes inherited from Error

#channel, #code, #details, #operation, #request_id, #suggestion

Instance Method Summary collapse

Methods inherited from Error

#cause, #retryable?, #to_s

Constructor Details

#initialize(message = 'Operation cancelled', **kwargs) ⇒ CancellationError

Returns a new instance of CancellationError.



270
271
272
273
274
# File 'lib/kubemq/errors.rb', line 270

def initialize(message = 'Operation cancelled', **kwargs)
  kwargs[:code] = ErrorCode::CANCELLED
  kwargs[:retryable] = false unless kwargs.key?(:retryable)
  super
end