Exception: Sqreen::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sqreen/exception.rb

Overview

TODO: do we really want this to be StandardError? Base exeception class for sqreen

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, *args) ⇒ Exception

Returns a new instance of Exception.



12
13
14
15
# File 'lib/sqreen/exception.rb', line 12

def initialize(msg = nil, *args)
  super(msg, *args)
  log_message msg if msg
end

Instance Method Details

#log_message(msg) ⇒ Object



17
18
19
# File 'lib/sqreen/exception.rb', line 17

def log_message(msg)
  Sqreen.log.error(msg)
end