Exception: ActiveRecord::SnapshotView::SaveWork
- Inherits:
-
Exception
- Object
- Exception
- ActiveRecord::SnapshotView::SaveWork
- Defined in:
- lib/activerecord_snapshot_view/snapshot_view.rb
Overview
if a block given to the new_version method throws this exception, then the working table will still be made current
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
Instance Method Summary collapse
- #backtrace ⇒ Object
-
#initialize(cause = nil) ⇒ SaveWork
constructor
A new instance of SaveWork.
- #message ⇒ Object
Constructor Details
#initialize(cause = nil) ⇒ SaveWork
Returns a new instance of SaveWork.
73 74 75 |
# File 'lib/activerecord_snapshot_view/snapshot_view.rb', line 73 def initialize(cause=nil) @cause = cause end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
72 73 74 |
# File 'lib/activerecord_snapshot_view/snapshot_view.rb', line 72 def cause @cause end |
Instance Method Details
#backtrace ⇒ Object
81 82 83 |
# File 'lib/activerecord_snapshot_view/snapshot_view.rb', line 81 def backtrace (@cause.backtrace if @cause) || super end |
#message ⇒ Object
77 78 79 |
# File 'lib/activerecord_snapshot_view/snapshot_view.rb', line 77 def (@cause. if @cause) || "SaveWork" end |