Sha256: 5d7e20112e2258f143571bce99fe5f2dd1348f6841116e1551bac619ba26e36a
Contents?: true
Size: 744 Bytes
Versions: 11
Compression:
Stored size: 744 Bytes
Contents
module SlackRubyBot module Commands class Base class << self alias _invoke invoke def invoke(client, data) _invoke client, data rescue Mongoid::Errors::Validations => e logger.info "#{name.demodulize.upcase}: #{client.owner}, error - #{e.document.class}, #{e.document.errors.to_hash}" client.say(channel: data.channel, text: e.document.errors.first[1], gif: 'error') true rescue StandardError => e logger.info "#{name.demodulize.upcase}: #{client.owner}, #{e.class}: #{e}" logger.debug e.backtrace.join("\n") client.say(channel: data.channel, text: e.message, gif: 'error') true end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems