angels 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/angels.rb +11 -1
- data/lib/angels/version.rb +1 -1
- metadata +2 -2
data/lib/angels.rb
CHANGED
@@ -27,7 +27,17 @@ module Angels
|
|
27
27
|
sleep opts[:loop_sleep]
|
28
28
|
rescue SignalException, Interrupt; SystemExit; Process.exit
|
29
29
|
rescue => e
|
30
|
-
opts[:exception_handler]
|
30
|
+
handler = opts[:exception_handler]
|
31
|
+
if handler
|
32
|
+
if handler.is_a? Symbol
|
33
|
+
case handler
|
34
|
+
when :hoptoad; HoptoadNotifier.notify(e)
|
35
|
+
else raise handler.inspect
|
36
|
+
end
|
37
|
+
else
|
38
|
+
handler.call(e)
|
39
|
+
end
|
40
|
+
end
|
31
41
|
raise e unless opts[:retry]
|
32
42
|
sleep opts[:retry_sleep]
|
33
43
|
end
|
data/lib/angels/version.rb
CHANGED