rescue unmeaningful exception from settingslogic if the namespace doesn't exists and replace it with meaningful error message

This commit is contained in:
Jonne Hass 2011-09-12 01:05:49 +02:00
parent 91756663a7
commit 4b0c45d895

View file

@ -42,7 +42,13 @@ HELP
Process.exit(1) Process.exit(1)
end end
super begin
super
rescue TypeError
puts "Couldn't find section ''#{self.namespace}' in config/application.yml."
puts "Double check it's there and that you haven't set RAILS_ENV to something weired (check it for typos)"
Process.exit(1)
end
if no_cert_file_in_prod? if no_cert_file_in_prod?
$stderr.puts <<-HELP $stderr.puts <<-HELP