Exception: I3Ipc::Protocol::WrongMagicString

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/i3ipc/protocol.rb

Overview

Throws when received data with not expected magic string. Usually this means that protocol is not compatible with current i3-ipc version.

Instance Method Summary collapse

Constructor Details

#initialize(magic_string) ⇒ WrongMagicString

Returns a new instance of WrongMagicString.



23
24
25
# File 'lib/i3ipc/protocol.rb', line 23

def initialize(magic_string)
  @magic_string = magic_string
end

Instance Method Details

#messageObject



27
28
29
# File 'lib/i3ipc/protocol.rb', line 27

def message
  %Q{Magic code expected '#{MAGIC_STRING}', but was '#{@magic_string}'}
end