2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-26 07:02:12 +00:00
Files
test/doc/components/execution_monitor/execution_exception.html
Gennadiy Rozental 8ee41f3ba4 New Version
[SVN r18711]
2003-06-09 08:07:03 +00:00

51 lines
3.3 KiB
HTML

<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> > <A href="../index.html">Components</A> > <A href="index.html">The
Execution Monitor</A> > <SPAN class="current_article">boost::execution_exception</SPAN> </DIV>
<DIV class="body"> <IMG src='../../btl.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 controlled function run. It intentionally does not allocate any memory to be safe to use in case of 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>:
<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>
<SPAN class="cpp-type">char</SPAN> <SPAN class="reserv-word">const</SPAN>* 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, it will never reach the <A href="execution_monitor.html">boost::execution_monitor</A>.</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) that it is
unreasonable to continue execution. </P>
</DIV>
<DIV class="footer">
<DIV class="footer-body">
<P>Copyright &copy <A href='mailto:rogeeff@emailaccount.com'>Gennadiy Rozental</A> 2001-2003.<BR>
Permission to copy, use, modify, sell and distribute this document is granted provided this copyright notice appears
in all copies. This document is provided "as is" without express or implied warranty and with no claim as to its suitability
for any purpose.</P>
<P>Revised: 9 June, 2003</P>
</DIV>
</DIV>
</BODY>
</HTML>