aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-29 14:51:04 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-29 14:51:04 -0800
commit5d1f0d436cf17dca8dca0a89381577465735319a (patch)
treee5663b0e33f3f32e2ec42edb41c97f4e906ac363 /railties/lib/rails
parent5977e7e4d534463c53af1acef960bccade8c8ecc (diff)
parent7d6592ebd0b04aab2415fce8098e21212bc8c5c3 (diff)
downloadrails-5d1f0d436cf17dca8dca0a89381577465735319a.tar.gz
rails-5d1f0d436cf17dca8dca0a89381577465735319a.tar.bz2
rails-5d1f0d436cf17dca8dca0a89381577465735319a.zip
Merge pull request #13879 from schneems/schneems/more-explicit-database-config-error
Enhance errors while retrieving database config
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/application/configuration.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb
index e902205a13..20e3de32aa 100644
--- a/railties/lib/rails/application/configuration.rb
+++ b/railties/lib/rails/application/configuration.rb
@@ -109,6 +109,8 @@ module Rails
raise "YAML syntax error occurred while parsing #{paths["config/database"].first}. " \
"Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
"Error: #{e.message}"
+ rescue => e
+ raise e, "Cannot load `Rails.application.database_configuration`:\n#{e.message}", e.backtrace
end
def log_level