Exception: DurableHuggingfaceHub::CorruptedCacheError

Inherits:
DurableHuggingfaceHubError show all
Defined in:
lib/durable_huggingface_hub/errors.rb

Overview

Error raised when cached files are corrupted or invalid.

Examples:

raise CorruptedCacheError.new("/path/to/file", "Checksum mismatch")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, reason) ⇒ CorruptedCacheError

Creates a new corrupted cache error.

Parameters:

  • path (String)

    Path to corrupted file

  • reason (String)

    Reason for corruption



317
318
319
320
# File 'lib/durable_huggingface_hub/errors.rb', line 317

def initialize(path, reason)
  @path = path
  super("Corrupted cache file at '#{path}': #{reason}")
end

Instance Attribute Details

#pathString (readonly)

Returns The corrupted file path.

Returns:

  • (String)

    The corrupted file path



311
312
313
# File 'lib/durable_huggingface_hub/errors.rb', line 311

def path
  @path
end