Commit 13bd791d authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Downloader] ensure that a downloader failure results in a DownloaderError so…

[Downloader] ensure that a downloader failure results in a DownloaderError so the Downloader can catch it

Helpful for https://github.com/CocoaPods/cocoapods-downloader/pull/36
parent 7ddfdd3f
require 'cocoapods-downloader' require 'cocoapods-downloader'
require 'claide/informative_error'
module Pod module Pod
module Downloader module Downloader
class DownloaderError; include CLAide::InformativeError; end
class Base class Base
override_api do override_api do
def execute_command(executable, command, raise_on_failure = false) def execute_command(executable, command, raise_on_failure = false)
Executable.execute_command(executable, command, raise_on_failure) Executable.execute_command(executable, command, raise_on_failure)
rescue CLAide::InformativeError => e
raise DownloaderError, e.message
end end
# Indicates that an action will be performed. The action is passed as a # Indicates that an action will be performed. The action is passed as a
......
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