From f8771912e17240c4c26f9456324a6d25bd913cef Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 13 Nov 2019 16:00:51 +0100 Subject: [PATCH 1/2] show type of index when non-implemented exception is thrown --- arangod/Indexes/Index.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arangod/Indexes/Index.cpp b/arangod/Indexes/Index.cpp index cdccc1199181..52ad5a34e6b5 100644 --- a/arangod/Indexes/Index.cpp +++ b/arangod/Indexes/Index.cpp @@ -688,7 +688,7 @@ arangodb::aql::AstNode* Index::specializeCondition(arangodb::aql::AstNode* /* no arangodb::aql::Variable const* /* reference */) const { // the default implementation should never be called TRI_ASSERT(false); - THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "no default implementation for specializeCondition"); + THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, std::string("no default implementation for specializeCondition. index type: ") + typeName()); } std::unique_ptr Index::iteratorForCondition(transaction::Methods* /* trx */, @@ -697,7 +697,7 @@ std::unique_ptr Index::iteratorForCondition(transaction::Methods* IndexIteratorOptions const& /* opts */) { // the default implementation should never be called TRI_ASSERT(false); - THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, "no default implementation for iteratorForCondition"); + THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, std::string("no default implementation for iteratorCondition. index type: ") + typeName()); } /// @brief perform some base checks for an index condition part From 4f134a17d3bf10ed3bfcb3f9a2e788da18963976 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 13 Nov 2019 16:26:08 +0100 Subject: [PATCH 2/2] fix message --- arangod/Indexes/Index.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arangod/Indexes/Index.cpp b/arangod/Indexes/Index.cpp index 52ad5a34e6b5..2831d6431f5b 100644 --- a/arangod/Indexes/Index.cpp +++ b/arangod/Indexes/Index.cpp @@ -697,7 +697,7 @@ std::unique_ptr Index::iteratorForCondition(transaction::Methods* IndexIteratorOptions const& /* opts */) { // the default implementation should never be called TRI_ASSERT(false); - THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, std::string("no default implementation for iteratorCondition. index type: ") + typeName()); + THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL, std::string("no default implementation for iteratorForCondition. index type: ") + typeName()); } /// @brief perform some base checks for an index condition part