From f6b143316040b44d952dc40626ca21922f7de1fe Mon Sep 17 00:00:00 2001 From: Willi Goesgens Date: Mon, 25 Aug 2014 10:27:25 +0200 Subject: [PATCH] When compiled in maintainer mode, print c-backtraces on Arango Exceptions too. --- arangod/Utils/Exception.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arangod/Utils/Exception.cpp b/arangod/Utils/Exception.cpp index 921343da4d..7de9fc6f82 100644 --- a/arangod/Utils/Exception.cpp +++ b/arangod/Utils/Exception.cpp @@ -44,6 +44,11 @@ Exception::Exception (int code, _file(file), _line(line), _code(code) { +#ifdef TRI_ENABLE_MAINTAINER_MODE +#if HAVE_BACKTRACE + _backtrace(); +#endif +#endif } //////////////////////////////////////////////////////////////////////////////// @@ -59,6 +64,11 @@ Exception::Exception (int code, _file(file), _line(line), _code(code) { +#ifdef TRI_ENABLE_MAINTAINER_MODE +#if HAVE_BACKTRACE + _backtrace(); +#endif +#endif } ////////////////////////////////////////////////////////////////////////////////