openstax_rescue_from 1.7.2 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/openstax/rescue_from.rb +10 -0
- data/lib/openstax/rescue_from/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 670397a8a7c60263a07415f40b98bcf9b48f9eb3
|
4
|
+
data.tar.gz: 444ac6579b7266f8a56a7fb7e28d3ec9639122f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96fd235c11fe50267f9bf53e949630e48ccc3ccbb5df5d574085892e651f4b1c23736d47d8a1f0b82844ce4a4d046da657635e8e0ae6ec7d787bf02aa5b539a5
|
7
|
+
data.tar.gz: 3b28b27ecca76ed10cffb9ed2fd9dfb8bf7b34ef007119df96cef51cbc13cc7171621c50679558640761fc5940ab56c9c2a8effdb190e7fc48719ec26deadf4b
|
data/lib/openstax/rescue_from.rb
CHANGED
@@ -14,6 +14,16 @@ module OpenStax
|
|
14
14
|
finish_exception_rescue(proxy, listener)
|
15
15
|
end
|
16
16
|
|
17
|
+
def do_not_reraise
|
18
|
+
original = configuration.raise_exceptions
|
19
|
+
begin
|
20
|
+
configuration.raise_exceptions = false
|
21
|
+
yield
|
22
|
+
ensure
|
23
|
+
configuration.raise_exceptions = original
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
17
27
|
def register_exception(exception, options = {})
|
18
28
|
name = exception.is_a?(String) ? exception : exception.name
|
19
29
|
options = ExceptionOptions.new(options)
|
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.8.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: 2017-01-
|
12
|
+
date: 2017-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|