Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/changelog/config.rb')
-rw-r--r--lib/gitlab/changelog/config.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/gitlab/changelog/config.rb b/lib/gitlab/changelog/config.rb
index be8009750da..0538fe68474 100644
--- a/lib/gitlab/changelog/config.rb
+++ b/lib/gitlab/changelog/config.rb
@@ -52,7 +52,12 @@ module Gitlab
end
if (template = hash['template'])
- config.template = Parser.new.parse_and_transform(template)
+ config.template =
+ begin
+ TemplateParser::Parser.new.parse_and_transform(template)
+ rescue TemplateParser::Error => e
+ raise Error, e.message
+ end
end
if (categories = hash['categories'])
@@ -73,7 +78,12 @@ module Gitlab
def initialize(project)
@project = project
@date_format = DEFAULT_DATE_FORMAT
- @template = Parser.new.parse_and_transform(DEFAULT_TEMPLATE)
+ @template =
+ begin
+ TemplateParser::Parser.new.parse_and_transform(DEFAULT_TEMPLATE)
+ rescue TemplateParser::Error => e
+ raise Error, e.message
+ end
@categories = {}
@tag_regex = DEFAULT_TAG_REGEX
end