Exception: SmqlToAR::SubSMQLError

Inherits:
SMQLError
  • Object
show all
Defined in:
lib/smql_to_ar.rb

Overview

Ein Fehler ist in einem Subquery aufgetreten. Die eigentliche Exception wird in @data hinterlegt.

Instance Attribute Summary

Attributes inherited from SMQLError

#data

Instance Method Summary collapse

Constructor Details

#initialize(query, model, exception) ⇒ SubSMQLError

Returns a new instance of SubSMQLError.



45
46
47
48
49
50
# File 'lib/smql_to_ar.rb', line 45

def initialize query, model, exception
	ex = {class: exception.class, message: exception.message}
	ex[:data] = exception.data  if exception.respond_to? :data
	super query: query, model: model.to_s, exception: ex
	set_backtrace exception.backtrace
end