Skip to content

Commit

Permalink
Add SignalException handling in run_loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkiesoft committed Sep 30, 2017
1 parent 949fe29 commit 534faf6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/fastladder/crawler.rb
Expand Up @@ -101,6 +101,9 @@ def run_loop
rescue Interrupt
@logger.warn "\n=> #{$!.message} trapped. Terminating..."
return true
rescue SignalException
@logger.warn "\n=> #{$!.message} trapped. Terminating..."
return true
rescue Exception
@logger.error %!Crawler error: #{$!.message}\n#{$!.backtrace.join("\n")}!
ensure
Expand Down

0 comments on commit 534faf6

Please sign in to comment.