File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 1+ * Active Storage error classes like ` ActiveStorage::IntegrityError ` and
2+ ` ActiveStorage::UnrepresentableError ` now inherit from ` ActiveStorage::Error `
3+ instead of ` StandardError ` . This permits rescuing ` ActiveStorage::Error ` to
4+ handle all Active Storage errors.
5+
6+ * Andrei Makarov* , * George Claghorn*
7+
18* Uploaded files assigned to a record are persisted to storage when the record
29 is saved instead of immediately.
310
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module ActiveStorage
4- class InvariableError < StandardError ; end
5- class UnpreviewableError < StandardError ; end
6- class UnrepresentableError < StandardError ; end
4+ # Generic base class for all Active Storage exceptions.
5+ class Error < StandardError ; end
6+
7+ class InvariableError < Error ; end
8+ class UnpreviewableError < Error ; end
9+ class UnrepresentableError < Error ; end
710
811 # Raised when uploaded or downloaded data does not match a precomputed checksum.
912 # Indicates that a network error or a software bug caused data corruption.
10- class IntegrityError < StandardError ; end
13+ class IntegrityError < Error ; end
1114end
You can’t perform that action at this time.
0 commit comments