mirror of https://gitee.com/bigwinds/arangodb
add exception in case graph cannot be found
This commit is contained in:
parent
f5116c4bc3
commit
328a80692b
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue