Exception: Petra::ValueComparisonError
- Inherits:
-
HandlerException
- Object
- StandardError
- PetraError
- ExtendedError
- HandlerException
- Petra::ValueComparisonError
- Defined in:
- lib/petra/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
The affected attribute.
-
#external_value ⇒ Object
readonly
The new external attribute value.
-
#object ⇒ Object
readonly
The affected proxy.
Instance Method Summary collapse
- #continuable? ⇒ Boolean
-
#ignore!(update_value: false) ⇒ Object
Tells the current transaction to ignore further errors of this kind until the attribute value is changed again externally.
Methods inherited from HandlerException
#continue!, #reset_transaction!, #retry!, #rollback_transaction!
Methods inherited from ExtendedError
Constructor Details
This class inherits a constructor from Petra::ExtendedError
Instance Attribute Details
#attribute ⇒ Object (readonly)
The affected attribute
85 86 87 |
# File 'lib/petra/exceptions.rb', line 85 def attribute @attribute end |
#external_value ⇒ Object (readonly)
The new external attribute value
86 87 88 |
# File 'lib/petra/exceptions.rb', line 86 def external_value @external_value end |
#object ⇒ Object (readonly)
The affected proxy
84 85 86 |
# File 'lib/petra/exceptions.rb', line 84 def object @object end |
Instance Method Details
#continuable? ⇒ Boolean
107 108 109 |
# File 'lib/petra/exceptions.rb', line 107 def continuable? !@reset && !@rollback end |
#ignore!(update_value: false) ⇒ Object
Tells the current transaction to ignore further errors of this kind until the attribute value is changed again externally.
100 101 102 103 104 105 |
# File 'lib/petra/exceptions.rb', line 100 def ignore!(update_value: false) Petra.current_transaction.current_section.log_read_integrity_override(object, attribute: attribute, external_value: external_value, update_value: update_value) end |