errplane 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
data/lib/errplane.rb
CHANGED
@@ -33,13 +33,27 @@ module Errplane
|
|
33
33
|
@configuration ||= Configuration.new
|
34
34
|
end
|
35
35
|
|
36
|
-
def
|
36
|
+
def transmit_unless_ignorable(e, env)
|
37
37
|
begin
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
black_box = assemble_black_box_for(e)
|
39
|
+
::Rails.logger.info("\nTransmitter: #{transmitter.inspect}")
|
40
|
+
::Rails.logger.info("\nBlack Box: #{black_box.to_json}")
|
41
|
+
::Rails.logger.info("\nIgnorable Exception? #{ignorable_exception?(e)}")
|
42
|
+
::Rails.logger.info("\nEnvironment: #{ENV.to_hash}")
|
43
|
+
transmitter.relay(black_box) unless ignorable_exception?(e)
|
44
|
+
rescue
|
45
|
+
configuration.logger.info("[Errplane] Something went terribly wrong. Exception failed to take off.")
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def transmit(e)
|
50
|
+
begin
|
51
|
+
black_box = assemble_black_box_for(e)
|
52
|
+
::Rails.logger.info("\nTransmitter: #{transmitter.inspect}")
|
53
|
+
::Rails.logger.info("\nBlack Box: #{black_box.to_json}")
|
54
|
+
::Rails.logger.info("\nIgnorable Exception? #{ignorable_exception?(e)}")
|
55
|
+
::Rails.logger.info("\nEnvironment: #{ENV.to_hash}")
|
56
|
+
transmitter.relay(black_box)
|
43
57
|
rescue
|
44
58
|
configuration.logger.info("[Errplane] Something went terribly wrong. Exception failed to take off.")
|
45
59
|
end
|
data/lib/errplane/rack.rb
CHANGED
data/lib/errplane/railtie.rb
CHANGED
data/lib/errplane/sinatra.rb
CHANGED
data/lib/errplane/version.rb
CHANGED