提交 abb38fea 编写于 作者: C Carlos Antonio da Silva

Merge pull request #8279 from gaurish/database_error

Improved Error handling when parsing database.yaml, Fixes #8143
......@@ -105,6 +105,10 @@ def threadsafe!
def database_configuration
require 'erb'
YAML.load ERB.new(IO.read(paths["config/database"].first)).result
rescue Psych::SyntaxError => e
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}"
end
def log_level
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册