GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Clone URL: git://github.com/contrast/exceptional.git
exceptional / init.rb
100644 21 lines (16 sloc) 0.408 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'exceptional'
 
def to_stderr(s)
  STDERR.puts "** [Exceptional] " + s
end
 
config_file = File.join(RAILS_ROOT,"/config/exceptional.yml")
 
begin
  Exceptional.application_root = RAILS_ROOT
  Exceptional.environment = RAILS_ENV
  
  Exceptional.load_config(config_file)
  if Exceptional.enabled?
    Exceptional::Rails.init
  end
rescue Exception => e
  to_stderr e
  to_stderr "Plugin disabled."
end