mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Improve error messaging for fetching packages
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class W3DHub
|
||||
class Api
|
||||
class Package
|
||||
attr_reader :category, :subcategory, :name, :version, :size, :checksum, :checksum_chunk_size, :checksum_chunks,
|
||||
attr_reader :category, :subcategory, :name, :version, :size, :checksum, :checksum_chunk_size, :checksum_chunks, :error,
|
||||
:custom_partially_valid_at_bytes, :custom_is_patch
|
||||
|
||||
def initialize(hash)
|
||||
@@ -16,6 +16,7 @@ class W3DHub
|
||||
@checksum = @data[:checksum]
|
||||
@checksum_chunk_size = @data[:"checksum-chunk-size"]
|
||||
@checksum_chunks = @data[:"checksum-chunks"]
|
||||
@error = @data[:error] || nil
|
||||
|
||||
@custom_partially_valid_at_bytes = 0
|
||||
@custom_is_patch = false
|
||||
@@ -25,6 +26,10 @@ class W3DHub
|
||||
@checksum_chunks[:"#{key}"]
|
||||
end
|
||||
|
||||
def error?
|
||||
@error
|
||||
end
|
||||
|
||||
def partially_valid_at_bytes=(i)
|
||||
@custom_partially_valid_at_bytes = i
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user