error_code.html 7.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  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#idm45313925451968" 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#idm45313925451968"><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 &#8212; 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. </span>
  34. <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,
  35. <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,
  36. <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,
  37. <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>
  38. <div class="refsect1">
  39. <a name="idm45313890428784"></a><h2>Description</h2>
  40. <div class="note"><table border="0" summary="Note">
  41. <tr>
  42. <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
  43. <th align="left">Note</th>
  44. </tr>
  45. <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>
  46. </table></div>
  47. <p>
  48. 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.</p>
  49. <div class="note"><table border="0" summary="Note">
  50. <tr>
  51. <td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../../../../../doc/src/images/note.png"></td>
  52. <th align="left">Note</th>
  53. </tr>
  54. <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>
  55. </table></div>
  56. <p>
  57. </p>
  58. <div class="variablelist"><dl class="variablelist compact">
  59. <dt><span class="term"><code class="computeroutput">no_error</code><a name="boost.execution_exception.error_code.no_error"></a></span></dt>
  60. <dd>for completeness only; never returned </dd>
  61. <dt><span class="term"><code class="computeroutput">user_error</code><a name="boost.execution_exception.error_code.user_error"></a></span></dt>
  62. <dd>user reported non-fatal error </dd>
  63. <dt><span class="term"><code class="computeroutput">cpp_exception_error</code><a name="boost.execution_exception.error_code.cpp_exception_error"></a></span></dt>
  64. <dd>see note (1) above </dd>
  65. <dt><span class="term"><code class="computeroutput">system_error</code><a name="boost.execution_exception.error_code.system_error"></a></span></dt>
  66. <dd>see note (2) above </dd>
  67. <dt><span class="term"><code class="computeroutput">timeout_error</code><a name="boost.execution_exception.error_code.timeout_error"></a></span></dt>
  68. <dd>only detectable on certain platforms </dd>
  69. <dt><span class="term"><code class="computeroutput">user_fatal_error</code><a name="boost.execution_exception.error_code.user_fatal_error"></a></span></dt>
  70. <dd>user reported fatal error </dd>
  71. <dt><span class="term"><code class="computeroutput">system_fatal_error</code><a name="boost.execution_exception.error_code.system_fatal_error"></a></span></dt>
  72. <dd>see note (2) above </dd>
  73. </dl></div>
  74. </div>
  75. </div>
  76. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  77. <td align="left"></td>
  78. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  79. 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#idm45313925451968"><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>