aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorGeorge Claghorn <george.claghorn@gmail.com>2018-08-10 18:37:46 -0400
committerGeorge Claghorn <george.claghorn@gmail.com>2018-08-10 18:38:28 -0400
commit2d3a28b949f2e8a0b755afdb52cbcd55e5ac0d98 (patch)
tree6b40fb4d387105b55c412b64379ebbef42a0261e /activestorage
parent18425b837149bc0d50f8d5349e1091a623762d6b (diff)
downloadrails-2d3a28b949f2e8a0b755afdb52cbcd55e5ac0d98.tar.gz
rails-2d3a28b949f2e8a0b755afdb52cbcd55e5ac0d98.tar.bz2
rails-2d3a28b949f2e8a0b755afdb52cbcd55e5ac0d98.zip
Document all Active Storage error classes [ci skip]
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/lib/active_storage/errors.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activestorage/lib/active_storage/errors.rb b/activestorage/lib/active_storage/errors.rb
index 0547b8e705..f4bf66a615 100644
--- a/activestorage/lib/active_storage/errors.rb
+++ b/activestorage/lib/active_storage/errors.rb
@@ -4,8 +4,16 @@ module ActiveStorage
# Generic base class for all Active Storage exceptions.
class Error < StandardError; end
+ # 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.
class InvariableError < Error; end
+
+ # 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.
class UnpreviewableError < Error; end
+
+ # 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.
class UnrepresentableError < Error; end
# Raised when uploaded or downloaded data does not match a precomputed checksum.