diff --git a/hurricane/src/hurricane/Backtrace.cpp b/hurricane/src/hurricane/Backtrace.cpp index aad56166..02cb5b47 100644 --- a/hurricane/src/hurricane/Backtrace.cpp +++ b/hurricane/src/hurricane/Backtrace.cpp @@ -427,9 +427,11 @@ namespace Hurricane { // 3 libstdc++.6.dylib 0x9142514b _ZSt9terminatev + 29 - Backtrace::Backtrace () + Backtrace::Backtrace ( bool enabled ) : _stack() { + if (not enabled) return; + if (_inConstructor) { _stack.push_back( "[BUG] Backtrace::Backtrace(): An error occurred in the backtace *istself*." ); _stack.push_back( "" ); diff --git a/hurricane/src/hurricane/Error.cpp b/hurricane/src/hurricane/Error.cpp index 76a83b9c..ecbea250 100644 --- a/hurricane/src/hurricane/Error.cpp +++ b/hurricane/src/hurricane/Error.cpp @@ -47,7 +47,7 @@ namespace Hurricane { : Exception () , _reason (reason) , _code (0) - , _backtrace() + , _backtrace(false) { } @@ -55,7 +55,7 @@ namespace Hurricane { : Exception () , _reason (reason) , _code (code) - , _backtrace() + , _backtrace(false) { } @@ -63,7 +63,7 @@ namespace Hurricane { : Exception () , _reason () , _code (0) - , _backtrace() + , _backtrace(false) { static char formatted [ 8192 ]; va_list args; @@ -80,7 +80,7 @@ namespace Hurricane { : Exception () , _reason () , _code (code) - , _backtrace() + , _backtrace(false) { static char formatted [ 8192 ]; va_list args; diff --git a/hurricane/src/hurricane/hurricane/Backtrace.h b/hurricane/src/hurricane/hurricane/Backtrace.h index eefcfeaa..d2cddbc2 100644 --- a/hurricane/src/hurricane/hurricane/Backtrace.h +++ b/hurricane/src/hurricane/hurricane/Backtrace.h @@ -42,7 +42,7 @@ namespace Hurricane { class Backtrace { public: - Backtrace (); + Backtrace ( bool enabled ); ~Backtrace (); inline std::string where () const; inline std::string textWhere () const;