Class: WebTools::Support::Debugger::ObjectLogError

Inherits:
Process show all
Defined in:
lib/web_tools/support/debugger.rb

Instance Attribute Summary

Attributes inherited from Process

#exception, #label, #thread, #timestamp

Instance Method Summary collapse

Methods inherited from Process

#[], #[]=, #frames, new, #pop_exception_handling_frames, #ruby_frames, #to_hash

Constructor Details

#initialize(error) ⇒ ObjectLogError

Returns a new instance of ObjectLogError.



140
141
142
143
144
145
146
# File 'lib/web_tools/support/debugger.rb', line 140

def initialize(error)
  super(error)
  @log_entry = error
  @label = error.label
  @timestamp = error.timestamp
  @thread = error.continuation
end

Instance Method Details

#deleteObject



148
149
150
151
152
153
154
155
# File 'lib/web_tools/support/debugger.rb', line 148

def delete
  if Maglev::System.needs_commit
    raise Exception, "Abort would loose data. Commit your data and try again"
  end
  Maglev.abort_transaction
  ObjectLogEntry.object_log.delete(@log_entry)
  Maglev.commit_transaction
end