summaryrefslogtreecommitdiff
path: root/app/models/ci/commit.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-11-19 20:16:56 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2015-11-19 20:17:17 +0100
commit8248314bc9256d3a0252ad6322df098edca7385a (patch)
tree47e52c79d20fcf218ac88aaa93cd7fe77505e3d0 /app/models/ci/commit.rb
parenta5b10196e649b57cf7cc698fe6fb34f73eec47ea (diff)
downloadgitlab-ce-8248314bc9256d3a0252ad6322df098edca7385a.tar.gz
Don't rescue Exception, but StandardErrorci-yaml-validation
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