Allow exceptions processing node and segment requests to propagate and
be handled by the default handler so they are logged.
This commit is contained in:
parent
786bc55209
commit
0975858cdb
4 changed files with 24 additions and 62 deletions
|
@ -59,18 +59,12 @@ class Segment < ActiveRecord::Base
|
|||
return segment
|
||||
end
|
||||
|
||||
def save_with_history
|
||||
begin
|
||||
Segment.transaction do
|
||||
self.timestamp = Time.now
|
||||
self.save!
|
||||
old_segment = OldSegment.from_segment(self)
|
||||
old_segment.save!
|
||||
end
|
||||
|
||||
return true
|
||||
rescue
|
||||
return nil
|
||||
def save_with_history!
|
||||
Segment.transaction do
|
||||
self.timestamp = Time.now
|
||||
self.save!
|
||||
old_segment = OldSegment.from_segment(self)
|
||||
old_segment.save!
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue