errplane 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/errplane.rb +5 -1
- data/lib/errplane/configuration.rb +8 -0
- data/lib/errplane/version.rb +1 -1
- metadata +2 -2
data/lib/errplane.rb
CHANGED
@@ -35,7 +35,11 @@ module Errplane
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def transmit_to_api(exception)
|
38
|
-
transmitter.relay(assemble_black_box_for(exception))
|
38
|
+
transmitter.relay(assemble_black_box_for(exception)) unless ignorable_exception?(exception)
|
39
|
+
end
|
40
|
+
|
41
|
+
def ignorable_exception?(exception)
|
42
|
+
return configuration.ignored_exceptions.include?(exception.class.to_s)
|
39
43
|
end
|
40
44
|
|
41
45
|
private
|
@@ -7,5 +7,13 @@ module Errplane
|
|
7
7
|
attr_accessor :environment_name
|
8
8
|
attr_accessor :project_root
|
9
9
|
attr_accessor :framework
|
10
|
+
attr_accessor :ignored_exceptions
|
11
|
+
|
12
|
+
DEFAULT_IGNORED_EXCEPTIONS = %w{ActiveRecord::RecordNotFound
|
13
|
+
ActionController::RoutingError}
|
14
|
+
|
15
|
+
def initialize
|
16
|
+
@ignored_exceptions = DEFAULT_IGNORED_EXCEPTIONS.dup
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
data/lib/errplane/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: errplane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-06-
|
12
|
+
date: 2012-06-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: This gem provides exception reporting with Errplane for Rails 3.x applications.
|
15
15
|
email:
|