summaryrefslogtreecommitdiff
path: root/app/models/ci/commit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r--app/models/ci/commit.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb
index b0c78499e49..971e899de84 100644
--- a/app/models/ci/commit.rb
+++ b/app/models/ci/commit.rb
@@ -190,14 +190,11 @@ module Ci
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 Psych::SyntaxError => e
- save_yaml_error(e.message)
- nil
- rescue Exception
- save_yaml_error("Undefined yaml error")
+ rescue
+ save_yaml_error("Undefined error")
nil
end