diff --git a/lib/redmine/configuration.rb b/lib/redmine/configuration.rb index d2d27f775..901914a94 100644 --- a/lib/redmine/configuration.rb +++ b/lib/redmine/configuration.rb @@ -93,7 +93,7 @@ module Redmine yaml = nil begin yaml = YAML::load(ERB.new(File.read(filename)).result) - rescue ArgumentError + rescue ArgumentError, Psych::SyntaxError abort "Your Redmine configuration file located at #{filename} is not a valid YAML file and could not be loaded." rescue SyntaxError => e abort "A syntax error occurred when parsing your Redmine configuration file located at #{filename} with ERB:\n#{e.message}"