From e5e291b377213bf11587b7463b7a9b568bb61910 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 May 2014 10:53:31 +0000 Subject: 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 --- lib/redmine/configuration.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/redmine') 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) -- cgit v1.2.3