Exception: Cuniculus::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cuniculus/exceptions.rb

Overview

Cuniculus-specific exceptions

  • ‘Cuniculus::Error`: Default exception raised by Cuniculus. All exceptions classes defined by Cuniculus descend from this class.

  • ‘Cuniculus::BadlyFormattedPayload`: A Cuniculus consumer received an improperly formatted job message.

  • ‘Cuniculus::ConfigError`: Incorrect configuration passed to Cuniculus.

  • ‘Cuniculus::RMQConnectionError`: Unable to connect to RabbitMQ.

  • ‘Cuniculus::RMQQueueConfigurationConflict`: The queue configuration given to Cuniculus conflicts with the current configuration of the same existing queue in RabbitMQ.

  • ‘Cuniculus::WorkerOptionsError`: Invalid options passed to cuniculus_options.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#wrapped_exceptionObject

If the Cuniculus exception wraps an underlying exception, the latter is held here.



20
21
22
# File 'lib/cuniculus/exceptions.rb', line 20

def wrapped_exception
  @wrapped_exception
end

Instance Method Details

#causeException#cause

Underlying exception ‘cause`

Returns:



25
26
27
# File 'lib/cuniculus/exceptions.rb', line 25

def cause
  wrapped_exception || super
end

#messageObject



29
30
31
# File 'lib/cuniculus/exceptions.rb', line 29

def message
  wrapped_exception&.message || to_s
end