Class: Rubirai::RubiraiErrorEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/rubirai/events/rubirai_events.rb

Overview

Error events thrown when errors happened in event listeners

Instance Attribute Summary collapse

Attributes inherited from Event

#bot, #raw

Instance Method Summary collapse

Methods inherited from Event

parse, #parse_val_from_key, set_event, type_to_klass, valid_type?

Constructor Details

#initialize(err, bot = nil) ⇒ RubiraiErrorEvent

An error event just for internal use

Parameters:

  • err (RuntimeError)

    the error object



15
16
17
18
# File 'lib/rubirai/events/rubirai_events.rb', line 15

def initialize(err, bot = nil)
  super nil, bot
  @err = err
end

Instance Attribute Details

#errObject (readonly)

Returns the value of attribute err.



10
11
12
# File 'lib/rubirai/events/rubirai_events.rb', line 10

def err
  @err
end