summaryrefslogtreecommitdiffstats
path: root/lib/redmine/configuration.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-24 10:53:31 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-05-24 10:53:31 +0000
commite5e291b377213bf11587b7463b7a9b568bb61910 (patch)
tree150bbf0c1c180b8d0c35de9e2bf6e56fdb03a8ee /lib/redmine/configuration.rb
parent169711bf466279ebe8d929e0fb6eba7bb0a6d0eb (diff)
downloadredmine-e5e291b377213bf11587b7463b7a9b568bb61910.tar.gz
redmine-e5e291b377213bf11587b7463b7a9b568bb61910.zip
Adds a custom message for when a syntax error occurs (#16878).
git-svn-id: http://svn.redmine.org/redmine/trunk@13151 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/configuration.rb')
-rw-r--r--lib/redmine/configuration.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/redmine/configuration.rb b/lib/redmine/configuration.rb
index 051ed7759..01abf4e93 100644
--- a/lib/redmine/configuration.rb
+++ b/lib/redmine/configuration.rb
@@ -86,6 +86,9 @@ module Redmine
rescue ArgumentError
$stderr.puts "Your Redmine configuration file located at #{filename} is not a valid YAML file and could not be loaded."
exit 1
+ rescue SyntaxError => e
+ $stderr.puts "A syntax error occurred when parsing your Redmine configuration file located at #{filename} with ERB:\n#{e.message}"
+ exit 1
end
conf = {}
if yaml.is_a?(Hash)