Print out backtrace as well.

This commit is contained in:
Guo Xiang Tan 2017-10-12 14:51:17 +08:00
parent 97395ebb66
commit 23415caecd
1 changed files with 2 additions and 2 deletions

View File

@ -11,11 +11,11 @@ reload_settings = lambda {
unless String === SiteSetting.push_api_secret_key && SiteSetting.push_api_secret_key.length == 32
SiteSetting.push_api_secret_key = SecureRandom.hex
end
rescue ActiveRecord::StatementInvalid
# This will happen when migrating a new database
rescue => e
STDERR.puts "URGENT: #{e} Failed to initialize site #{RailsMultisite::ConnectionManagement.current_db}"
STDERR.puts "URGENT: Failed to initialize site #{RailsMultisite::ConnectionManagement.current_db}:"\
"#{e.message}\n#{e.backtrace.join("\n")}"
# the show must go on, don't stop startup if multisite fails
end
end