Exception: Shikibu::ChannelModeConflictError

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

Overview

Raised when subscribing with a different mode than the channel's established mode

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel, existing_mode, requested_mode) ⇒ ChannelModeConflictError



64
65
66
67
68
69
70
# File 'lib/shikibu/errors.rb', line 64

def initialize(channel, existing_mode, requested_mode)
  @channel = channel
  @existing_mode = existing_mode
  @requested_mode = requested_mode
  super("Channel '#{channel}' is already configured as '#{existing_mode}' mode. " \
        "Cannot subscribe with '#{requested_mode}' mode.")
end

Instance Attribute Details

#channelObject (readonly)

Returns the value of attribute channel.



62
63
64
# File 'lib/shikibu/errors.rb', line 62

def channel
  @channel
end

#existing_modeObject (readonly)

Returns the value of attribute existing_mode.



62
63
64
# File 'lib/shikibu/errors.rb', line 62

def existing_mode
  @existing_mode
end

#requested_modeObject (readonly)

Returns the value of attribute requested_mode.



62
63
64
# File 'lib/shikibu/errors.rb', line 62

def requested_mode
  @requested_mode
end