Sha256: b19d66bdaddf1b726e7dbde1b496705999b0afa46b32035fd58a16d2b6dc417a
Contents?: true
Size: 632 Bytes
Versions: 8
Compression:
Stored size: 632 Bytes
Contents
class ApplicationError < StandardError attr_reader :tags, :data def initialize(subject, tags = '', data = {}) super(subject) @tags = tags @data = data puts "#{'-'*10}\n#{@data}\n#{'-'*10}" if Rails.env.development? Log.on_raise(self, caller(2)) end # для логирования при бросании и в дефолтном обработчике def with_log? self.class.name.end_with?('Log', 'Alert') end # для логирования при бросании и в дефолтном обработчике def with_alert? self.class.name.end_with?('Alert') end end
Version data entries
8 entries across 8 versions & 1 rubygems