Commit a5cf5afd authored by Matija Čupić's avatar Matija Čupić

Stack rescue blocks for Gitlab::Ci::Config#initialize

parent 0df8e09f
...@@ -7,7 +7,6 @@ module Gitlab ...@@ -7,7 +7,6 @@ module Gitlab
ConfigError = Class.new(StandardError) ConfigError = Class.new(StandardError)
def initialize(config, opts = {}) def initialize(config, opts = {})
begin
@config = Config::Extendable @config = Config::Extendable
.new(build_config(config, opts)) .new(build_config(config, opts))
.to_hash .to_hash
...@@ -16,7 +15,6 @@ module Gitlab ...@@ -16,7 +15,6 @@ module Gitlab
@global.compose! @global.compose!
rescue Loader::FormatError, Extendable::ExtensionError => e rescue Loader::FormatError, Extendable::ExtensionError => e
raise Config::ConfigError, e.message raise Config::ConfigError, e.message
end
rescue ::Gitlab::Ci::External::Processor::FileError => e rescue ::Gitlab::Ci::External::Processor::FileError => e
raise ::Gitlab::Ci::YamlProcessor::ValidationError, e.message raise ::Gitlab::Ci::YamlProcessor::ValidationError, e.message
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment