openstax_rescue_from 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YWRiNjg3NmVhNWU4ZGViMzRlZGRhMmIyYzVmZTZiOWY0ODRhODdiNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzljMGY2Y2ViNjY2OTlkYjJlMjA4YmQ0NDY2YzUxNjFkOTdiY2E4YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTUyMWE3NGM4YThiZjQ3ZDk1MTJjNWU5NzgyZDkwMDQ0OGUxZWVkYWNhNWVk
|
10
|
+
ZTY0Y2NmMGVkNWI1NDk3YmYxYTE4YTgzYjgxMGFmMTJmNzUwYjk1NTdjNmI4
|
11
|
+
OWJhMDM1ZTkzYjlhNTU5OWVkNDE3NmI3NjJjY2Y1YzRhNTU0MWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGYyMjQ3MWNjOTNkY2ExMzgzNTg0OWQxN2JjYTgxZTExOTA3YjA5Y2Y2MzNj
|
14
|
+
NGQwZWNhZmJhZjIzZTQ4YmEzNmZhYjQzYWIxMGZjOTBjY2I0NTVkNzM5Mzk3
|
15
|
+
NzEzZDA0NWRmNjQwMzIyYmMzMTA2OTBmZjc3NDJlMTVmMWI1NDI=
|
@@ -28,15 +28,15 @@ module OpenStax
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def cause
|
31
|
-
@cause ||= exception.respond_to?(:cause)
|
31
|
+
@cause ||= if exception.respond_to?(:cause) && exception.cause
|
32
|
+
ExceptionCauseProxy.new(exception.cause)
|
33
|
+
else
|
34
|
+
nil
|
35
|
+
end
|
32
36
|
end
|
33
37
|
|
34
|
-
def
|
35
|
-
@backtrace ||=
|
36
|
-
end
|
37
|
-
|
38
|
-
def all_backtrace_lines
|
39
|
-
@all_backtrace_lines ||= exception.backtrace.join("\n")
|
38
|
+
def logger_backtrace
|
39
|
+
@backtrace ||= exception.backtrace.join("\n")
|
40
40
|
end
|
41
41
|
|
42
42
|
def first_backtrace_line
|
@@ -10,16 +10,15 @@ module OpenStax
|
|
10
10
|
def record_system_error!(prefix = "An exception occurred")
|
11
11
|
Rails.logger.error("#{prefix}: #{proxy.name} [#{proxy.error_id}] " +
|
12
12
|
"<#{proxy.message}> #{proxy.extras}\n\n" +
|
13
|
-
"#{proxy.
|
13
|
+
"#{proxy.logger_backtrace}")
|
14
14
|
|
15
15
|
record_system_error_recursively!
|
16
16
|
end
|
17
17
|
|
18
18
|
private
|
19
19
|
def record_system_error_recursively!
|
20
|
-
if proxy.cause
|
21
|
-
RescueFrom.register_exception(proxy.
|
22
|
-
@proxy = ExceptionProxy.new(proxy.cause)
|
20
|
+
if @proxy = proxy.cause
|
21
|
+
RescueFrom.register_exception(proxy.name)
|
23
22
|
record_system_error!("Exception cause")
|
24
23
|
end
|
25
24
|
end
|
data/lib/openstax_rescue_from.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openstax_rescue_from
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-10-
|
12
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -177,6 +177,7 @@ files:
|
|
177
177
|
- lib/openstax/rescue_from/controller.rb
|
178
178
|
- lib/openstax/rescue_from/default_exceptions.rb
|
179
179
|
- lib/openstax/rescue_from/engine.rb
|
180
|
+
- lib/openstax/rescue_from/exception_cause_proxy.rb
|
180
181
|
- lib/openstax/rescue_from/exception_options.rb
|
181
182
|
- lib/openstax/rescue_from/exception_proxy.rb
|
182
183
|
- lib/openstax/rescue_from/logger.rb
|