Exception: Redis::KeyspaceNotifications::ParseError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/redis/keyspace_notifications.rb

Overview

Raised when a message on a notification channel cannot be decoded.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, channel: nil, payload: nil) ⇒ ParseError

Returns a new instance of ParseError.

Parameters:

  • message (String) —

    the error message

  • channel (String, nil) (defaults to: nil) —

    the raw channel

  • payload (String, nil) (defaults to: nil) —

    the raw payload



25
26
27
28
29
# File 'lib/redis/keyspace_notifications.rb', line 25

def initialize(message, channel: nil, payload: nil)
  super(message)
  @channel = channel
  @payload = payload
end

Instance Attribute Details

#channel ⇒ String? (readonly)

Returns:

  • (String, nil) —

    the raw channel the message arrived on

  • (String, nil) —

    the raw message payload



20
21
22
# File 'lib/redis/keyspace_notifications.rb', line 20

def channel
  @channel
end

#payload ⇒ String? (readonly)

Returns:

  • (String, nil) —

    the raw channel the message arrived on

  • (String, nil) —

    the raw message payload



20
21
22
# File 'lib/redis/keyspace_notifications.rb', line 20

def payload
  @payload
end