File: execution_exception.html

package info (click to toggle)
boost 1.34.1-14
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 116,412 kB
  • ctags: 259,566
  • sloc: cpp: 642,395; xml: 56,450; python: 17,612; ansic: 14,520; sh: 2,265; yacc: 858; perl: 481; makefile: 478; lex: 94; sql: 74; csh: 6
file content (56 lines) | stat: -rw-r--r-- 3,575 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
<TITLE>boost::execution_exception</TITLE>
<LINK rel="stylesheet" type="text/css" href="../../style/btl.css" media="screen">
<LINK rel="stylesheet" type="text/css" href="../../style/btl-print.css" media="print">
<META http-equiv="Content-Language" content="en-us">
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<DIV class="header"> <A href="../../index.html">Boost.Test</A> &gt; <A href="../index.html">Components</A> &gt; <A href="index.html">The 
  Execution Monitor</A> &gt; <SPAN class="current_article">boost::execution_exception</SPAN> </DIV>
<DIV class="body"> <IMG src="../../btl1.gif" width="252" height="43" alt="Boost Test logo"> 
  <H1 class="subtitle">boost::execution_exception</H1>
  <P class="first-line-indented"> The boost::execution exception is an exception
    used by the Execution Monitor to report problems  detected during a monitored
    function run. It intentionally does not allocate any memory so as to be safe
    for use when there is a  lack of memory.</P>
  <PRE class="code"><SPAN class="reserv-word">class</SPAN> <SPAN class="new-term">execution_exception</SPAN> {
<SPAN class="reserv-word">public</SPAN>:
    execution_exception( error_code ec, const_string what_msg );

    <SPAN class="reserv-word">enum</SPAN> error_code {
        cpp_exception_error,    <SPAN class="comment">// see note (1) below</SPAN>
        user_error,             // <SPAN class="comment">user reported nonfatal error</SPAN>
        system_error,           <SPAN class="comment">// see note (2) below</SPAN>
        timeout_error,          <SPAN class="comment">// only detectable on certain platforms</SPAN>
        user_fatal_error,       <SPAN class="comment">// user reported fatal error</SPAN>
        system_fatal_error      <SPAN class="comment">// see note (2) below</SPAN>
    };

    error_code   code() <SPAN class="reserv-word">const</SPAN>;  <SPAN class="comment">// use this method to get an error code for the exception</SPAN>
    const_string what() <SPAN class="reserv-word">const</SPAN>;  <SPAN class="comment">// use this method to get an error message for the exception</SPAN>
};
</PRE>
  <P class="first-line-indented"> Note 1: Only uncaught C++ exceptions are treated
    as errors. If the application catches a  C++ exception, this exception will
    never reach the Execution Monitor.</P>
  <P class="first-line-indented"> Note 2: These errors include UNIX signals and Windows structured exceptions. 
    They are often initiated by hardware traps.</P>
  <P class="first-line-indented"> The implementation decides what is a fatal_system_exception
    and what is just a system_exception.  Fatal errors are so likely to have
    corrupted machine state (like a stack overflow or addressing exception),
    so  it is unreasonable to continue execution in this case.</P>
</DIV>
<DIV class="footer"> 
  <DIV class="footer-body"> 
    <P> &copy; <A name="Copyright">Copyright</A> <A href="mailto:boost-test%20at%20emailaccount%20dot%20com%20%28please%20unobscure%29">Gennadiy Rozental</A> 2001-2006. <BR>
      Distributed under the Boost Software License, Version 1.0.
      (See accompanying file <A href="../../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> or copy at 
      <A href="http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</A>)</P>
        <P>Revised:        <!-- #BeginDate format:Sw1 -->4 February, 2006<!-- #EndDate -->     </P>
  </DIV>
</DIV>
</BODY>
</HTML>