Exception: ActiveFedora::RecordNotDestroyed
- Inherits:
-
ActiveFedoraError
- Object
- StandardError
- ActiveFedoraError
- ActiveFedora::RecordNotDestroyed
- Defined in:
- lib/active_fedora/errors.rb
Overview
Raised by ActiveFedora::Base#destroy! when a call to #destroy would return false.
begin
complex_operation_that_internally_calls_destroy!
rescue ActiveFedora::RecordNotDestroyed => invalid
puts invalid.record.errors
end
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(message = nil, record = nil) ⇒ RecordNotDestroyed
constructor
A new instance of RecordNotDestroyed.
Constructor Details
#initialize(message = nil, record = nil) ⇒ RecordNotDestroyed
Returns a new instance of RecordNotDestroyed.
78 79 80 81 |
# File 'lib/active_fedora/errors.rb', line 78 def initialize( = nil, record = nil) @record = record super() end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
76 77 78 |
# File 'lib/active_fedora/errors.rb', line 76 def record @record end |