mirror of https://gitee.com/bigwinds/arangodb
added missing error handling for importing edges
This commit is contained in:
parent
60b540b231
commit
81b94bff94
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue