From 18425b837149bc0d50f8d5349e1091a623762d6b Mon Sep 17 00:00:00 2001 From: George Claghorn Date: Fri, 10 Aug 2018 18:35:49 -0400 Subject: Add a generic base class for Active Storage exceptions Closes #33292. [Andrei Makarov & George Claghorn] --- activestorage/lib/active_storage/errors.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'activestorage/lib/active_storage/errors.rb') diff --git a/activestorage/lib/active_storage/errors.rb b/activestorage/lib/active_storage/errors.rb index bedcd080c4..0547b8e705 100644 --- a/activestorage/lib/active_storage/errors.rb +++ b/activestorage/lib/active_storage/errors.rb @@ -1,11 +1,14 @@ # frozen_string_literal: true module ActiveStorage - class InvariableError < StandardError; end - class UnpreviewableError < StandardError; end - class UnrepresentableError < StandardError; end + # Generic base class for all Active Storage exceptions. + class Error < StandardError; end + + class InvariableError < Error; end + class UnpreviewableError < Error; end + class UnrepresentableError < Error; end # Raised when uploaded or downloaded data does not match a precomputed checksum. # Indicates that a network error or a software bug caused data corruption. - class IntegrityError < StandardError; end + class IntegrityError < Error; end end -- cgit v1.2.3