Exception: MassRecord::Actions::IndividualError

Inherits:
Exception
  • Object
show all
Defined in:
lib/mass_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(exception, json_object: nil, operation: nil, table: nil) ⇒ IndividualError

Returns a new instance of IndividualError.



36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/mass_record.rb', line 36

def initialize exception, json_object:nil, operation:nil, table:nil
	self.backtrace = exception.backtrace
	self.backtrace_locations = exception.backtrace_locations
	self.cause = exception.cause
	self.exception = exception.exception
	self.message = exception.message

	self.original_exception = exception
	self.json_object = json_object
	self.operation = operation
	self.table = table
end

Instance Attribute Details

#backtraceObject

Returns the value of attribute backtrace.



34
35
36
# File 'lib/mass_record.rb', line 34

def backtrace
  @backtrace
end

#backtrace_locationsObject

Returns the value of attribute backtrace_locations.



34
35
36
# File 'lib/mass_record.rb', line 34

def backtrace_locations
  @backtrace_locations
end

#causeObject

Returns the value of attribute cause.



34
35
36
# File 'lib/mass_record.rb', line 34

def cause
  @cause
end

#exceptionObject

Returns the value of attribute exception.



34
35
36
# File 'lib/mass_record.rb', line 34

def exception
  @exception
end

#json_objectObject

Returns the value of attribute json_object.



34
35
36
# File 'lib/mass_record.rb', line 34

def json_object
  @json_object
end

#messageObject

Returns the value of attribute message.



34
35
36
# File 'lib/mass_record.rb', line 34

def message
  @message
end

#operationObject

Returns the value of attribute operation.



34
35
36
# File 'lib/mass_record.rb', line 34

def operation
  @operation
end

#original_exceptionObject

Returns the value of attribute original_exception.



34
35
36
# File 'lib/mass_record.rb', line 34

def original_exception
  @original_exception
end

#tableObject

Returns the value of attribute table.



34
35
36
# File 'lib/mass_record.rb', line 34

def table
  @table
end

Instance Method Details

#to_sObject



49
50
51
# File 'lib/mass_record.rb', line 49

def to_s
	original_exception.to_s
end