1
0
Fork 0

Fix condition of assertion when error: true is to be expected.

This commit is contained in:
Willi Goesgens 2014-10-20 14:48:54 +02:00
parent c179978980
commit 28149299b9
1 changed files with 5 additions and 3 deletions

View File

@ -4288,9 +4288,11 @@ static void throwExceptionAfterBadSyncRequest (ClusterCommResult* res,
v = TRI_LookupArrayJson(json, "errorNum");
if (TRI_IsNumberJson(v)) {
/* if we've got an error num, error has to be true. */
TRI_ASSERT(errorNum != TRI_ERROR_INTERNAL);
errorNum = static_cast<int>(v->_value._number);
if (static_cast<int>(v->_value._number) != TRI_ERROR_NO_ERROR) {
/* if we've got an error num, error has to be true. */
TRI_ASSERT(errorNum == TRI_ERROR_INTERNAL);
errorNum = static_cast<int>(v->_value._number);
}
}
v = TRI_LookupArrayJson(json, "errorMessage");