Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Type error_code

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.

Synopsis

// 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 };

Description

[Note] 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] Note

(2) These errors include Unix signals and Windows structured exceptions. They are often initiated by hardware traps.

no_error
for completeness only; never returned
user_error
user reported non-fatal error
cpp_exception_error
see note (1) above
system_error
see note (2) above
timeout_error
only detectable on certain platforms
user_fatal_error
user reported fatal error
system_fatal_error
see note (2) above

PrevUpHomeNext