summaryrefslogtreecommitdiff
path: root/app/models/ci/commit.rb
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-12-07 10:06:07 +0100
committerZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-12-07 10:06:07 +0100
commit0e96d6eb10f92f14d9c06e1728b1a3597a856d2a (patch)
treee003ee5ba773743fb856f9899b2a2c311139f048 /app/models/ci/commit.rb
parent46278ec7ba7c618acaf7381ad466742ce84e33db (diff)
parent234f4bf20fb338f2164976fd39203fbc671afd29 (diff)
downloadgitlab-ce-0e96d6eb10f92f14d9c06e1728b1a3597a856d2a.tar.gz
Merge branch 'master' into merge-if-green
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r--app/models/ci/commit.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb
index f96b479feac..0f74a7f0688 100644
--- a/app/models/ci/commit.rb
+++ b/app/models/ci/commit.rb
@@ -196,13 +196,13 @@ module Ci
end
def config_processor
+ return nil unless ci_yaml_file
@config_processor ||= Ci::GitlabCiYamlProcessor.new(ci_yaml_file, gl_project.path_with_namespace)
- rescue Ci::GitlabCiYamlProcessor::ValidationError => e
+ rescue Ci::GitlabCiYamlProcessor::ValidationError, Psych::SyntaxError => e
save_yaml_error(e.message)
nil
- rescue Exception => e
- logger.error e.message + "\n" + e.backtrace.join("\n")
- save_yaml_error("Undefined yaml error")
+ rescue
+ save_yaml_error("Undefined error")
nil
end