Exception: Fontisan::Tasks::FixtureDownloader::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/fontisan/tasks/fixture_downloader.rb

Overview

Error raised after exhausting all retries. Carries the last underlying exception so callers can log the root cause.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url:, attempts:, last_error:) ⇒ Error

Returns a new instance of Error.



51
52
53
54
55
# File 'lib/fontisan/tasks/fixture_downloader.rb', line 51

def initialize(url:, attempts:, last_error:)
  @last_error = last_error
  super("Failed to download #{url} after #{attempts} attempts: " \
        "#{last_error.class}: #{last_error.message}")
end

Instance Attribute Details

#last_errorObject (readonly)

Returns the value of attribute last_error.



49
50
51
# File 'lib/fontisan/tasks/fixture_downloader.rb', line 49

def last_error
  @last_error
end