Spec-Zone.ru › Homebrew

Exception: CurlDownloadStrategyError Private

Inherits:
RuntimeError
  • Object
  • RuntimeError
  • CurlDownloadStrategyError
show all
Defined in:
exceptions.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Raised in CurlDownloadStrategy#fetch.

Direct Known Subclasses

HomebrewCurlDownloadStrategyError

Instance Method Summary collapse

  • #initialize(url, details = nil) ⇒ void constructor private

Constructor Details

#initialize(url, details = nil) ⇒ void

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Parameters:

  • url (String)
  • details (String, nil) (defaults to: nil)


805
806
807
808
809
810
811
812
813
# File 'exceptions.rb', line 805

def initialize(url, details = nil)
  suffix = "\n#{details}" if details.present?
  case url
  when %r{^file://(.+)}
    super "File cannot be read: #{Regexp.last_match(1)}#{suffix}"
  else
    super "Download failed: #{url}#{suffix}"
  end
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/CurlDownloadStrategyError.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API