Exception: Fontisan::Tasks::FixtureDownloader::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Fontisan::Tasks::FixtureDownloader::Error
- 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
-
#last_error ⇒ Object
readonly
Returns the value of attribute last_error.
Instance Method Summary collapse
-
#initialize(url:, attempts:, last_error:) ⇒ Error
constructor
A new instance of Error.
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.}") end |
Instance Attribute Details
#last_error ⇒ Object (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 |