Exception: SolidObjects::SyncInsideTransaction

Inherits:
Error
  • Object
show all
Defined in:
lib/solid_objects/errors.rb,
sig/generated/lib/solid_objects/errors.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(actor_type:, actor_id:, message_name:) ⇒ SyncInsideTransaction

Returns a new instance of SyncInsideTransaction.

RBS:

  • (actor_type: String, actor_id: String, message_name: String) -> void

Parameters:

  • actor_type: (String)
  • actor_id: (String)
  • message_name: (String)


159
160
161
162
163
164
165
166
167
# File 'lib/solid_objects/errors.rb', line 159

def initialize(actor_type:, actor_id:, message_name:)
  @actor_type = actor_type
  @actor_id = actor_id
  @message_name = message_name
  super(
    "cannot synchronously invoke #{actor_type}(#{actor_id.inspect}).#{message_name} " \
      "inside an open database transaction; call it before the transaction or enqueue it with async"
  )
end

Instance Attribute Details

#actor_idObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


156
157
158
# File 'lib/solid_objects/errors.rb', line 156

def actor_id
  @actor_id
end

#actor_typeObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


156
157
158
# File 'lib/solid_objects/errors.rb', line 156

def actor_type
  @actor_type
end

#message_nameObject (readonly)

RBS:

  • @actor_type: String

  • @actor_id: String

  • @message_name: String

Returns:

  • (Object)


156
157
158
# File 'lib/solid_objects/errors.rb', line 156

def message_name
  @message_name
end