1
0
Fork 0

add exception in case graph cannot be found

This commit is contained in:
jsteemann 2018-08-14 14:06:07 +02:00
parent f5116c4bc3
commit 328a80692b
1 changed files with 6 additions and 0 deletions

View File

@ -1486,6 +1486,9 @@ void Ast::injectBindParameters(BindParameters& parameters) {
TRI_ASSERT(graphNode->isStringValue());
std::string graphName = graphNode->getString();
auto graph = _query->lookupGraphByName(graphName);
if (graph == nullptr) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_GRAPH_NOT_FOUND);
}
TRI_ASSERT(graph != nullptr);
auto vColls = graph->vertexCollections();
for (const auto& n : vColls) {
@ -1515,6 +1518,9 @@ void Ast::injectBindParameters(BindParameters& parameters) {
TRI_ASSERT(graphNode->isStringValue());
std::string graphName = graphNode->getString();
auto graph = _query->lookupGraphByName(graphName);
if (graph == nullptr) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_GRAPH_NOT_FOUND);
}
TRI_ASSERT(graph != nullptr);
auto vColls = graph->vertexCollections();
for (const auto& n : vColls) {