1
0
Fork 0

added missing error handling for importing edges

This commit is contained in:
Jan Steemann 2013-06-25 16:22:10 +02:00
parent 60b540b231
commit 81b94bff94
1 changed files with 9 additions and 0 deletions

View File

@ -305,6 +305,9 @@ bool RestImportHandler::createByDocumentsLines () {
if (res1 == TRI_ERROR_NO_ERROR && res2 == TRI_ERROR_NO_ERROR) {
res = trx.createEdge(&document, values, waitForSync, &edge);
}
else {
res = (res1 != TRI_ERROR_NO_ERROR ? res1 : res2);
}
if (edge._fromKey != 0) {
TRI_Free(TRI_CORE_MEM_ZONE, edge._fromKey);
@ -479,6 +482,9 @@ bool RestImportHandler::createByDocumentsList () {
if (res1 == TRI_ERROR_NO_ERROR && res2 == TRI_ERROR_NO_ERROR) {
res = trx.createEdge(&document, values, waitForSync, &edge);
}
else {
res = (res1 != TRI_ERROR_NO_ERROR ? res1 : res2);
}
if (edge._fromKey != 0) {
TRI_Free(TRI_CORE_MEM_ZONE, edge._fromKey);
@ -720,6 +726,9 @@ bool RestImportHandler::createByKeyValueList () {
if (res1 == TRI_ERROR_NO_ERROR && res2 == TRI_ERROR_NO_ERROR) {
res = trx.createEdge(&document, json, waitForSync, &edge);
}
else {
res = (res1 != TRI_ERROR_NO_ERROR ? res1 : res2);
}
if (edge._fromKey != 0) {
TRI_Free(TRI_CORE_MEM_ZONE, edge._fromKey);