1
0
Fork 0

Improve error reporting if selecting a graph description fails

This commit is contained in:
Wilfried Goesgens 2015-11-19 16:27:36 +01:00
parent 8a5380d767
commit 16eee4793d
1 changed files with 6 additions and 2 deletions

View File

@ -91,12 +91,16 @@ triagens::aql::Graph* triagens::arango::lookupGraphByName (TRI_vocbase_t* vocbas
SingleCollectionReadOnlyTransaction trx(new StandaloneTransactionContext(), vocbase, collName);
int res = trx.begin();
if (res != TRI_ERROR_NO_ERROR) {
THROW_ARANGO_EXCEPTION(res);
THROW_ARANGO_EXCEPTION_FORMAT(res,
"while looking up graph '%s' in _graphs",
name.c_str());
}
TRI_doc_mptr_copy_t mptr;
res = trx.read(&mptr, name);
if (res != TRI_ERROR_NO_ERROR) {
THROW_ARANGO_EXCEPTION(res);
THROW_ARANGO_EXCEPTION_FORMAT(res,
"while looking up graph '%s' in _graphs",
name.c_str());
}
TRI_shaped_json_t document;
TRI_EXTRACT_SHAPED_JSON_MARKER(document, mptr.getDataPtr());