Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap-rubygem.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Mazovetskiy <glex.spb@gmail.com>2021-04-25 12:27:13 +0300
committerGleb Mazovetskiy <glex.spb@gmail.com>2021-04-25 12:27:13 +0300
commitfdef7a019b1a455ab8ce202b744f45147587bd47 (patch)
treee6d10d197490d408b0ab853b2a01de434999a373
parent8b5b57938f0fba0a0eb7d190db2c28ec9848130d (diff)
Updater: log file on network error
-rw-r--r--tasks/updater/network.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/tasks/updater/network.rb b/tasks/updater/network.rb
index 6502bb8..0d2394a 100644
--- a/tasks/updater/network.rb
+++ b/tasks/updater/network.rb
@@ -25,7 +25,13 @@ class Updater
log_http_get_files files, path_url, false
files.map do |name|
Thread.start {
- contents[name] = URI.open("#{path_url}/#{name}").read
+ begin
+ url = "#{path_url}/#{name}"
+ contents[name] = URI.open(url).read
+ rescue Exception => e
+ log "Error downloading #{url}: #{e}"
+ exit 1
+ end
WRITE_FILES_MUTEX.synchronize { write_cached_files path, name => contents[name] }
}
end.each(&:join)