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.



77
78
79
80
81
# File 'lib/gcloud/datastore/errors.rb', line 77

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)



69
70
71
# File 'lib/gcloud/datastore/errors.rb', line 69

def commit_error
  @commit_error
end

#rollback_errorObject (readonly)

An error that occurred within the transaction. (optional)



74
75
76
# File 'lib/gcloud/datastore/errors.rb', line 74

def rollback_error
  @rollback_error
end