zumobi 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zumobi/exception_handler.rb +4 -6
- data/lib/zumobi/version.rb +1 -1
- metadata +3 -3
@@ -30,19 +30,17 @@ class ExceptionHandler
|
|
30
30
|
|
31
31
|
def self.method_missing(name, *args, &block)
|
32
32
|
if [:debug, :info, :warn, :error, :fatal].include?(name)
|
33
|
-
c = SimpleConfig.for(:airbrake)
|
34
|
-
if (c.api_key.blank?)
|
35
|
-
raise "To log errors, add an airbrake config in simple config, with your app's api_key"
|
36
|
-
end
|
37
|
-
|
38
33
|
e = args[0]
|
39
34
|
unless EXCLUDED_EXCEPTIONS.include?(e.class.name)
|
35
|
+
if (Airbrake.configuration.api_key.blank?)
|
36
|
+
raise "To log errors, add an airbrake.rb initializer in your rails app."
|
37
|
+
end
|
40
38
|
# Note: Rails doesn't log the stacktrace... it's quite annoying
|
41
39
|
backtrace = e.backtrace ? ("\n" + e.backtrace.join("\n")) : ""
|
42
40
|
Rails.logger.send(name, e.message + backtrace, &block)
|
43
41
|
|
44
42
|
# Send to Airbrake
|
45
|
-
Airbrake.notify(e, {:
|
43
|
+
Airbrake.notify(e, {:environment_name => "#{ExceptionHandler.ip_address}"})
|
46
44
|
end
|
47
45
|
end
|
48
46
|
end
|
data/lib/zumobi/version.rb
CHANGED
metadata
CHANGED