Exception: Gcloud::Datastore::TransactionError

Inherits:
Error
  • Object
show all
Defined in:
lib/gcloud/datastore/errors.rb

Overview

# TransactionError

General error for Transaction problems.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

from_error, klass_for

Constructor Details

#initialize(message, commit_error: nil, rollback_error: nil) ⇒ TransactionError

Returns a new instance of TransactionError.



56
57
58
59
60
# File 'lib/gcloud/datastore/errors.rb', line 56

def initialize message, commit_error: nil, rollback_error: nil
  super(message)
  @commit_error   = commit_error
  @rollback_error = rollback_error
end

Instance Attribute Details

#commit_errorObject (readonly) Also known as: inner

An error that occurred within the transaction. (optional)



48
49
50
# File 'lib/gcloud/datastore/errors.rb', line 48

def commit_error
  @commit_error
end

#rollback_errorObject (readonly)

An error that occurred within the transaction. (optional)



53
54
55
# File 'lib/gcloud/datastore/errors.rb', line 53

def rollback_error
  @rollback_error
end