Skip to content

Commit

Permalink
Add detail description on two rescue phrase [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nidev committed May 15, 2015
1 parent d61ce37 commit 033b0a0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/rbitter/arcserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ def main_loop(streaming_adapter = Rbitter::StreamClient)
puts ""
puts "Interrupted..."
rescue Twitter::Error::Unauthorized => e
puts "Please configure your Twitter token on config.json."
warn "Twitter access unauthorized:"
warn " Possible solutions"
warn " 1. Configure Twitter token on config.json"
warn " 2. Check system time (Time is important on authentication)"
warn " 3. Check Twitter account status"
rescue Twitter::Error::ServerError, Resolv::ResolvError => e
puts "Service unavailable now. Retry in 5 second..."
sleep 5
retry
rescue Twitter::Error => e
puts "Twitter Error: #{e.inspect}"
warn "Twitter Error: #{e.inspect}"
warn "Main loop of ArcServer halted."
ensure
xmlrpcd_stop if Rbitter['xmlrpc']['enable']
@dt.job_cleanup
Expand Down

0 comments on commit 033b0a0

Please sign in to comment.