public
Description:
Homepage:
Clone URL: git://github.com/contrast/exceptional.git
exceptional / lib / exceptional.rb
100644 33 lines (28 sloc) 0.708 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$:.unshift File.dirname(__FILE__)
 
require 'exceptional/catcher'
require 'exceptional/startup'
require 'exceptional/log_factory'
require 'exceptional/config'
require 'exceptional/application_environment'
require 'exceptional/exception_data'
require 'exceptional/remote'
require 'exceptional/integration/rack'
 
module Exceptional
  PROTOCOL_VERSION = 5
  VERSION = '0.2.0'
  CLIENT_NAME = 'getexceptional-rails-plugin'
 
  def self.logger
    ::Exceptional::LogFactory.logger
  end
 
  def self.configure(api_key)
    Exceptional::Config.api_key = api_key
  end
 
  def self.rescue(&block)
    begin
      block.call
    rescue Exception => e
      Exceptional::Catcher.handle(e)
      raise(e)
    end
  end
end