class Corosync::Error
Base class that all Corosync
exceptions descend from.
Corosync
exception classes are programitcally generated from the ‘:cs_error_t` enum in `ffi/common.rb`. See that file for a comprehensive list of exception classes. The `:err_try_again` value will map to `Corosync::TryAgainError`. All exception classes follow the same pattern.
Constants
- Map
Public Instance Methods
@!attribute [rw] depth The number of {Corosync.cs_send} methods the exception has passed through. This is important so that we don’t rescue nested exceptions. For example, we call cs_send(:cpg_dispatch) which calls a callback which calls cs_send(:cpg_mcast_joined). If the cpg_mcast_joined were to raise an exception, and we had a rescue around the cpg_dispatch, we wouldn’t know whether the exception came from cpg_mcast_joined or cpg_dispatch. However in this case the depth would be 2, and so we would know not to rescue it. @return [Fixnum] Number of cs_send methods the exception has passed through
# File lib/corosync/exceptions.rb, line 11 def depth @depth ||= 0 end
# File lib/corosync/exceptions.rb, line 14 def depth=(value) @depth = value end