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:
Tom Hughes 2007-08-31 10:11:15 +00:00
parent 786bc55209
commit 0975858cdb
4 changed files with 24 additions and 62 deletions

View file

@ -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