32 #include "WTerminalColor.h"
50 explicit WException(
const std::string& msg = std::string() );
57 explicit WException(
const std::exception& e );
68 virtual const
char*
what() const throw();
static bool noBacktrace
True if the backtrace should NOT be printed.
WTerminalColor m_headlineColor
Color used for exception headline.
std::list< std::string > m_trace
Stack trace for identifying the source where this exception came from.
static void disableBacktrace()
Function disables backtraces.
WException(const std::string &msg=std::string())
Default constructor.
std::string m_msg
Message given during throw.
std::string getBacktrace() const
Returns a call stacktrace.
WTerminalColor m_functionColor
Color used for function name.
virtual ~WException()
Destructor.
virtual const char * what() const
Returns the message string set on throw.
WTerminalColor m_symbolColor
Color used for symbols.
WTerminalColor m_labelColor
Color used for the "trace:" label.
std::string getTrace() const
Prints the trace of the call chain which caused this exception.
Helper class to provide a convenient way to colorize output on the console.