2018-01-10 12:33:41 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-01-10 12:12:04 -05:00
|
|
|
module ActiveStorage
|
2018-08-10 18:35:49 -04:00
|
|
|
# Generic base class for all Active Storage exceptions.
|
|
|
|
class Error < StandardError; end
|
|
|
|
|
2018-08-10 18:37:46 -04:00
|
|
|
# Raised when ActiveStorage::Blob#variant is called on a blob that isn't variable.
|
|
|
|
# Use ActiveStorage::Blob#variable? to determine whether a blob is variable.
|
2018-08-10 18:35:49 -04:00
|
|
|
class InvariableError < Error; end
|
2018-08-10 18:37:46 -04:00
|
|
|
|
|
|
|
# Raised when ActiveStorage::Blob#preview is called on a blob that isn't previewable.
|
|
|
|
# Use ActiveStorage::Blob#previewable? to determine whether a blob is previewable.
|
2018-08-10 18:35:49 -04:00
|
|
|
class UnpreviewableError < Error; end
|
2018-08-10 18:37:46 -04:00
|
|
|
|
|
|
|
# Raised when ActiveStorage::Blob#representation is called on a blob that isn't representable.
|
|
|
|
# Use ActiveStorage::Blob#representable? to determine whether a blob is representable.
|
2018-08-10 18:35:49 -04:00
|
|
|
class UnrepresentableError < Error; end
|
2018-05-28 16:28:46 -04:00
|
|
|
|
|
|
|
# Raised when uploaded or downloaded data does not match a precomputed checksum.
|
|
|
|
# Indicates that a network error or a software bug caused data corruption.
|
2018-08-10 18:35:49 -04:00
|
|
|
class IntegrityError < Error; end
|
2018-08-18 13:31:33 -04:00
|
|
|
|
|
|
|
# Raised when ActiveStorage::Blob#download is called on a blob where the
|
|
|
|
# backing file is no longer present in its service.
|
|
|
|
class FileNotFoundError < Error; end
|
2021-01-29 09:07:30 -05:00
|
|
|
|
|
|
|
# Raised when a Previewer is unable to generate a preview image.
|
|
|
|
class PreviewError < Error; end
|
2018-01-10 12:12:04 -05:00
|
|
|
end
|