Navigation Menu

Skip to content

Commit

Permalink
Output raw error object as a part of error logs
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 14, 2015
1 parent 6179c5a commit 7521621
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/droonga/serf/downloader.rb
Expand Up @@ -59,7 +59,8 @@ def download
FileUtils.chmod(0755, absolete_output_path.to_s)
end
rescue Archive::Zip::UnzipError => archive_error
logger.warn("Downloaded zip file is broken.")
logger.warn("Downloaded zip file is broken.",
:detail => archive_error)
if @retry_count < MAX_RETRY_COUNT
@retry_count += 1
sleep(RETRY_INTERVAL * @retry_count)
Expand All @@ -68,7 +69,8 @@ def download
raise DownloadFailed.new("Couldn't download serf executable. Try it later.")
end
rescue Faraday::ConnectionFailed => network_error
logger.warn("Connection failed.")
logger.warn("Connection failed.",
:detail => network_error)
if @retry_count < MAX_RETRY_COUNT
@retry_count += 1
sleep(RETRY_INTERVAL * @retry_count)
Expand Down

0 comments on commit 7521621

Please sign in to comment.