1
0
Fork 0

attempt to fix issue #1943

This commit is contained in:
Jan Steemann 2016-07-15 17:40:42 +02:00
parent 9e06af757c
commit 60bb0f2dde
3 changed files with 10 additions and 1 deletions

View File

@ -65,7 +65,7 @@ SingleCollectionTransaction::SingleCollectionTransaction(
// add the (sole) collection
if (setupState() == TRI_ERROR_NO_ERROR) {
_cid = resolver()->getCollectionId(name);
addCollection(_cid, _accessType);
addCollection(_cid, name.c_str(), _accessType);
}
}

View File

@ -3292,6 +3292,9 @@ int Transaction::addCollectionEmbedded(TRI_voc_cid_t cid, TRI_transaction_type_e
false, _allowImplicitCollections);
if (res != TRI_ERROR_NO_ERROR) {
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + resolver()->getCollectionNameCluster(cid));
}
return registerError(res);
}
@ -3316,6 +3319,9 @@ int Transaction::addCollectionToplevel(TRI_voc_cid_t cid, TRI_transaction_type_e
}
if (res != TRI_ERROR_NO_ERROR) {
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + resolver()->getCollectionNameCluster(cid));
}
registerError(res);
}

View File

@ -385,6 +385,9 @@ class Transaction {
type,
_nestingLevel, true, true);
if (res != TRI_ERROR_NO_ERROR) {
if (res == TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION) {
THROW_ARANGO_EXCEPTION_MESSAGE(res, std::string(TRI_errno_string(res)) + ": " + collectionName);
}
THROW_ARANGO_EXCEPTION(res);
}
TRI_EnsureCollectionsTransaction(_trx, _nestingLevel);