Exception: DownloadError Private

Inherits:
RuntimeError
  • Object
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 Downloadable#fetch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(downloadable, cause) ⇒ 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:



782
783
784
785
786
787
788
789
# File 'exceptions.rb', line 782

def initialize(downloadable, cause)
  super <<~EOS
    Failed to download resource #{downloadable.download_queue_name.inspect}
    #{cause.message}
  EOS
  @cause = cause
  set_backtrace(cause.backtrace)
end

Instance Attribute Details

#cause ⇒ Exception (readonly)

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.

Returns:

  • (Exception)


779
780
781
# File 'exceptions.rb', line 779

def cause
  @cause
end