libexcept 1.1.19
Stack trace along C++ exceptions
Variables
libexcept::anonymous_namespace{exception.cpp} Namespace Reference

Variables

collect_stack_t g_collect_stack = collect_stack_t::COLLECT_STACK_YES
 Global flag to eventually prevent stack trace collection.
 

Variable Documentation

◆ g_collect_stack

collect_stack_t libexcept::anonymous_namespace{exception.cpp}::g_collect_stack = collect_stack_t::COLLECT_STACK_YES

Whenever a libexcept exception is raised, the stack gets collected. This is very slow if you run a test which is to generate exceptions over and over again, like 1,000,000 times in a tight loop.

To make your tests faster we added a general flag which one can use to collect or not collect the stack trace.

At some point we may add an option to our command lines/configuration files to tweak this flag on load. That way any of our daemons can benefit by not having a stack trace in a production environment unless requested. Remember, though, that we use exceptions wisely so they really only happens when something really bad is detected so it is fairly safe to keep the collection of the stack trace turned on.

Definition at line 166 of file exception.cpp.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.