• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Type error_code</title>
5<link rel="stylesheet" href="../../boostbook.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Boost.Test">
8<link rel="up" href="../execution_exception.html#idm46175619963632" title="Description">
9<link rel="prev" href="location.html" title="Struct location">
10<link rel="next" href="../execution_monitor.html" title="Class execution_monitor">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="location.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../execution_exception.html#idm46175619963632"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../execution_monitor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="refentry">
26<a name="boost.execution_exception.error_code"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Type error_code</span></h2>
29<p>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 &lt; 100 are often user assigned, values &gt; 255 are sometimes used to report system errors. Gaps in values allow for orderly expansion. </p>
30</div>
31<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
32<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../header/boost/test/execution_monitor_hpp.html" title="Header &lt;boost/test/execution_monitor.hpp&gt;">boost/test/execution_monitor.hpp</a>&gt;
33
34</span>
35<span class="keyword">enum</span> <span class="identifier">error_code</span> <span class="special">{</span> <a class="link" href="error_code.html#boost.execution_exception.error_code.no_error">no_error</a> = = 0, <a class="link" href="error_code.html#boost.execution_exception.error_code.user_error">user_error</a> = = 200,
36                  <a class="link" href="error_code.html#boost.execution_exception.error_code.cpp_exception_error">cpp_exception_error</a> = = 205, <a class="link" href="error_code.html#boost.execution_exception.error_code.system_error">system_error</a> = = 210,
37                  <a class="link" href="error_code.html#boost.execution_exception.error_code.timeout_error">timeout_error</a> = = 215, <a class="link" href="error_code.html#boost.execution_exception.error_code.user_fatal_error">user_fatal_error</a> = = 220,
38                  <a class="link" href="error_code.html#boost.execution_exception.error_code.system_fatal_error">system_fatal_error</a> = = 225 <span class="special">}</span><span class="special">;</span></pre></div>
39<div class="refsect1">
40<a name="idm46175619860720"></a><h2>Description</h2>
41<div class="note"><table border="0" summary="Note">
42<tr>
43<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
44<th align="left">Note</th>
45</tr>
46<tr><td align="left" valign="top"><p>(1) Only uncaught C++ exceptions are treated as errors. If a function catches a C++ exception, it never reaches the <a class="link" href="../execution_monitor.html" title="Class execution_monitor">execution_monitor</a>.</p></td></tr>
47</table></div>
48<p>
49The 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.</p>
50<div class="note"><table border="0" summary="Note">
51<tr>
52<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
53<th align="left">Note</th>
54</tr>
55<tr><td align="left" valign="top"><p>(2) These errors include Unix signals and Windows structured exceptions. They are often initiated by hardware traps. </p></td></tr>
56</table></div>
57<p>
58</p>
59<div class="variablelist"><dl class="variablelist compact">
60<dt><span class="term"><code class="computeroutput">no_error</code><a name="boost.execution_exception.error_code.no_error"></a></span></dt>
61<dd>for completeness only; never returned </dd>
62<dt><span class="term"><code class="computeroutput">user_error</code><a name="boost.execution_exception.error_code.user_error"></a></span></dt>
63<dd>user reported non-fatal error </dd>
64<dt><span class="term"><code class="computeroutput">cpp_exception_error</code><a name="boost.execution_exception.error_code.cpp_exception_error"></a></span></dt>
65<dd>see note (1) above </dd>
66<dt><span class="term"><code class="computeroutput">system_error</code><a name="boost.execution_exception.error_code.system_error"></a></span></dt>
67<dd>see note (2) above </dd>
68<dt><span class="term"><code class="computeroutput">timeout_error</code><a name="boost.execution_exception.error_code.timeout_error"></a></span></dt>
69<dd>only detectable on certain platforms </dd>
70<dt><span class="term"><code class="computeroutput">user_fatal_error</code><a name="boost.execution_exception.error_code.user_fatal_error"></a></span></dt>
71<dd>user reported fatal error </dd>
72<dt><span class="term"><code class="computeroutput">system_fatal_error</code><a name="boost.execution_exception.error_code.system_fatal_error"></a></span></dt>
73<dd>see note (2) above </dd>
74</dl></div>
75</div>
76</div>
77<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
78<td align="left"></td>
79<td align="right"><div class="copyright-footer">Copyright © 2001-2020 Boost.Test contributors<p>
80        Distributed under the Boost Software License, Version 1.0. (See accompanying
81        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
82      </p>
83</div></td>
84</tr></table>
85<hr>
86<div class="spirit-nav">
87<a accesskey="p" href="location.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../execution_exception.html#idm46175619963632"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../execution_monitor.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
88</div>
89</body>
90</html>
91