@@ -85,11 +85,9 module Redmine | |||
|
85 | 85 | begin |
|
86 | 86 | yaml = YAML::load(ERB.new(File.read(filename)).result) |
|
87 | 87 | rescue ArgumentError |
|
88 |
|
|
|
89 | exit 1 | |
|
88 | abort "Your Redmine configuration file located at #{filename} is not a valid YAML file and could not be loaded." | |
|
90 | 89 | rescue SyntaxError => e |
|
91 |
|
|
|
92 | exit 1 | |
|
90 | abort "A syntax error occurred when parsing your Redmine configuration file located at #{filename} with ERB:\n#{e.message}" | |
|
93 | 91 | end |
|
94 | 92 | conf = {} |
|
95 | 93 | if yaml.is_a?(Hash) |
@@ -100,8 +98,7 module Redmine | |||
|
100 | 98 | conf.merge!(yaml[env]) |
|
101 | 99 | end |
|
102 | 100 | else |
|
103 |
|
|
|
104 | exit 1 | |
|
101 | abort "Your Redmine configuration file located at #{filename} is not a valid Redmine configuration file." | |
|
105 | 102 | end |
|
106 | 103 | conf |
|
107 | 104 | end |
@@ -121,8 +118,7 module Redmine | |||
|
121 | 118 | begin |
|
122 | 119 | Regexp.new value.to_s.strip |
|
123 | 120 | rescue => e |
|
124 |
|
|
|
125 | exit 1 | |
|
121 | abort "Invalid regular expression set as #{name} setting in your Redmine configuration file:\n#{e.message}" | |
|
126 | 122 | end |
|
127 | 123 | end |
|
128 | 124 | end |
General Comments 0
You need to be logged in to leave comments.
Login now