Imported Upstream version 1.64.0
[platform/upstream/boost.git] / libs / test / doc / html / boost / execution_exception.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Class execution_exception</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="../header/boost/test/execution_monitor_hpp.html" title="Header &lt;boost/test/execution_monitor.hpp&gt;">
9 <link rel="prev" href="../header/boost/test/execution_monitor_hpp.html" title="Header &lt;boost/test/execution_monitor.hpp&gt;">
10 <link rel="next" href="execution_exception/location.html" title="Struct location">
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="../header/boost/test/execution_monitor_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/test/execution_monitor_hpp.html"><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_exception/location.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="refentry">
26 <a name="boost.execution_exception"></a><div class="titlepage"></div>
27 <div class="refnamediv">
28 <h2><span class="refentrytitle">Class execution_exception</span></h2>
29 <p>boost::execution_exception &#8212; This class is used to report any kind of an failure during execution of a monitored function inside of <a class="link" href="execution_monitor.html" title="Class execution_monitor">execution_monitor</a>. </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">class</span> <a class="link" href="execution_exception.html" title="Class execution_exception">execution_exception</a> <span class="special">{</span>
36 <span class="keyword">public</span><span class="special">:</span>
37   <span class="comment">// member classes/structs/unions</span>
38
39   <span class="comment">// Simple model for the location of failure in a source code.</span>
40
41   <span class="keyword">struct</span> <a class="link" href="execution_exception/location.html" title="Struct location">location</a> <span class="special">{</span>
42     <span class="comment">// <a class="link" href="execution_exception/location.html#boost.execution_exception.locationconstruct-copy-destruct">construct/copy/destruct</a></span>
43     <span class="keyword">explicit</span> <a class="link" href="execution_exception/location.html#idp57056832-bb"><span class="identifier">location</span></a><span class="special">(</span><span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">size_t</span> <span class="special">=</span> <span class="number">0</span><span class="special">,</span> <span class="keyword">char</span> <span class="keyword">const</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
44
45     <span class="comment">// public data members</span>
46     <span class="identifier">const_string</span> <span class="identifier">m_file_name</span><span class="special">;</span>    <span class="comment">// File name. </span>
47     <span class="identifier">size_t</span> <span class="identifier">m_line_num</span><span class="special">;</span>    <span class="comment">// Line number. </span>
48     <span class="identifier">const_string</span> <span class="identifier">m_function</span><span class="special">;</span>    <span class="comment">// Function name. </span>
49   <span class="special">}</span><span class="special">;</span>
50   <span class="keyword">enum</span> <a class="link" href="execution_exception/error_code.html" title="Type error_code">error_code</a><span class="special">;</span>
51   <span class="comment">// <a class="link" href="execution_exception.html#boost.execution_exceptionconstruct-copy-destruct">construct/copy/destruct</a></span>
52   <a class="link" href="execution_exception.html#idp57060320-bb"><span class="identifier">execution_exception</span></a><span class="special">(</span><span class="identifier">error_code</span><span class="special">,</span> <span class="identifier">const_string</span><span class="special">,</span> <a class="link" href="execution_exception/location.html" title="Struct location">location</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
53 <span class="special">}</span><span class="special">;</span></pre></div>
54 <div class="refsect1">
55 <a name="idp127313536"></a><h2>Description</h2>
56 <p>The instance of this class is thrown out of execution_monitor::execute invocation when failure is detected. Regardless of a kind of failure occurred the instance will provide a uniform way to catch and report it.</p>
57 <p>One important design rationale for this class is that we should be ready to work after fatal memory corruptions or out of memory conditions. To facilitate this class never allocates any memory and assumes that strings it refers to are either some constants or live in a some kind of persistent (preallocated) memory. </p>
58 <div class="refsect2">
59 <a name="idp127315024"></a><h3>
60 <a name="boost.execution_exceptionconstruct-copy-destruct"></a><code class="computeroutput">execution_exception</code> 
61         public
62        construct/copy/destruct</h3>
63 <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
64 <pre class="literallayout"><a name="idp57060320-bb"></a><span class="identifier">execution_exception</span><span class="special">(</span><span class="identifier">error_code</span> ec<span class="special">,</span> <span class="identifier">const_string</span> what_msg<span class="special">,</span> 
65                     <a class="link" href="execution_exception/location.html" title="Struct location">location</a> <span class="keyword">const</span> <span class="special">&amp;</span> location<span class="special">)</span><span class="special">;</span></pre>Constructs instance based on message, location and error code. <p>
66 </p>
67 <div class="variablelist"><table border="0" class="variablelist compact">
68 <colgroup>
69 <col align="left" valign="top">
70 <col>
71 </colgroup>
72 <tbody><tr>
73 <td><p><span class="term">Parameters:</span></p></td>
74 <td><div class="variablelist"><table border="0" class="variablelist compact">
75 <colgroup>
76 <col align="left" valign="top">
77 <col>
78 </colgroup>
79 <tbody>
80 <tr>
81 <td><p><span class="term"><code class="computeroutput">ec</code></span></p></td>
82 <td><p>error code </p></td>
83 </tr>
84 <tr>
85 <td><p><span class="term"><code class="computeroutput">location</code></span></p></td>
86 <td><p>error location </p></td>
87 </tr>
88 <tr>
89 <td><p><span class="term"><code class="computeroutput">what_msg</code></span></p></td>
90 <td><p>error message </p></td>
91 </tr>
92 </tbody>
93 </table></div></td>
94 </tr></tbody>
95 </table></div>
96 </li></ol></div>
97 </div>
98 </div>
99 </div>
100 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
101 <td align="left"></td>
102 <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2016 Boost.Test contributors<p>
103         Distributed under the Boost Software License, Version 1.0. (See accompanying
104         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>)
105       </p>
106 </div></td>
107 </tr></table>
108 <hr>
109 <div class="spirit-nav">
110 <a accesskey="p" href="../header/boost/test/execution_monitor_hpp.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../header/boost/test/execution_monitor_hpp.html"><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_exception/location.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
111 </div>
112 </body>
113 </html>