...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::execution_exception::error_code — These values are sometimes used as program return codes. The particular values have been chosen to avoid conflicts with commonly used program return codes: values < 100 are often user assigned, values > 255 are sometimes used to report system errors. Gaps in values allow for orderly expansion.
// In header: <boost/test/execution_monitor.hpp> enum error_code { no_error = = 0, user_error = = 200, cpp_exception_error = = 205, system_error = = 210, timeout_error = = 215, user_fatal_error = = 220, system_fatal_error = = 225 };
Note | |
---|---|
(1) Only uncaught C++ exceptions are treated as errors. If a function catches a C++ exception, it never reaches the execution_monitor. |
The implementation decides what is a system_fatal_error and what is just a system_exception. Fatal errors are so likely to have corrupted machine state (like a stack overflow or addressing exception) that it is unreasonable to continue execution.
Note | |
---|---|
(2) These errors include Unix signals and Windows structured exceptions. They are often initiated by hardware traps. |