From 802180e2f2b6f99f158ca6a3437d6a578a1ec3ff Mon Sep 17 00:00:00 2001 From: jsteemann Date: Mon, 22 May 2017 18:00:20 +0200 Subject: [PATCH] better error messages --- arangod/Aql/Query.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arangod/Aql/Query.cpp b/arangod/Aql/Query.cpp index 42fadebaf6..ce4b13d4e2 100644 --- a/arangod/Aql/Query.cpp +++ b/arangod/Aql/Query.cpp @@ -378,8 +378,10 @@ void Query::registerWarning(int code, char const* details) { if (DoFailOnWarning) { // make an error from each warning if requested - // note: this will throw! - registerErrorCustom(code, details); + if (details == nullptr) { + THROW_ARANGO_EXCEPTION(code); + } + THROW_ARANGO_EXCEPTION_MESSAGE(code, details); } if (_warnings.size() > _maxWarningCount) {