mirror of https://gitee.com/bigwinds/arangodb
Adjust replace to new TRI_V8ToVPack.
This commit is contained in:
parent
0770a4b665
commit
0f883dc0c8
|
@ -495,15 +495,10 @@ static void ReplaceVocbaseCol(bool useCollection,
|
|||
};
|
||||
|
||||
auto workOnOneDocument = [&](v8::Local<v8::Value> const newVal) {
|
||||
auto savePos = updateBuilder.buffer()->size();
|
||||
int res = TRI_V8ToVPack(isolate, updateBuilder, newVal, false);
|
||||
if (res != TRI_ERROR_NO_ERROR) {
|
||||
TRI_V8_THROW_EXCEPTION(res);
|
||||
}
|
||||
|
||||
if (savePos == updateBuilder.buffer()->size()) {
|
||||
TRI_V8_THROW_EXCEPTION_MESSAGE(TRI_errno(), "<data> is no valid JSON");
|
||||
}
|
||||
};
|
||||
|
||||
// In the !useCollection case the search value is already prepared, we
|
||||
|
|
Loading…
Reference in New Issue