forked from boostorg/system
System: refine docs for semantics of throws object
[SVN r49177]
This commit is contained in:
@ -619,18 +619,26 @@ for use as a "throw on error" tag.</p>
|
||||
with appropriate namespace qualifiers, have the following error handling
|
||||
semantics:</p>
|
||||
<blockquote>
|
||||
<p><i>Effects:</i> If <code>ec != throws</code>:</p>
|
||||
<ul>
|
||||
<li>If an error occurs, and sets <code>ec</code> to an appropriate <code>
|
||||
<a href="#Class-error_code">error_code</a></code> that identifies the error
|
||||
value and category. The category should be the most specific <code>
|
||||
<a href="#Class-error_category">error_category</a></code> applicable to the
|
||||
particular error.</li>
|
||||
<li>if an error does not occur, <code>ec.clear()</code>.</li>
|
||||
</ul>
|
||||
<p><i>Throws:</i> If <code>ec == throws</code>, throws an exception of type
|
||||
<p><i>Postconditions:</i></p>
|
||||
<blockquote>
|
||||
<p>If <code>&ec != &throws</code> and an error occurred:</p>
|
||||
<ul>
|
||||
<li> <code>ec.value()</code> returns the implementation specific error
|
||||
number for the particular error that occurred.</li>
|
||||
<li><code>ec.category()</code> returns the <code>
|
||||
<a href="#Class-error_category">error_category</a></code> for <code>ec.value()</code>.</li>
|
||||
</ul>
|
||||
<p>if <code>&ec != &throws</code> and an error did not occur, <code>ec.clear()</code>.</p>
|
||||
</blockquote>
|
||||
<p><i>Throws:</i></p>
|
||||
<blockquote>
|
||||
<p>If an error occurs and <code>&ec == &throws</code>, throws an exception of type
|
||||
<code><a href="#Class-system_error">system_error</a></code> or of a type
|
||||
derived from <code><a href="#Class-system_error">system_error</a></code>.</p>
|
||||
derived from <code><a href="#Class-system_error">system_error</a></code>. The
|
||||
exception's <code>code()</code> member function returns a reference to an
|
||||
<code>error_code</code> object with the behavior specified in <i>
|
||||
Postconditions</i>.</p>
|
||||
</blockquote>
|
||||
</blockquote>
|
||||
<h2><a name="Non-member-functions">Non-member functions</a></h2>
|
||||
<pre>bool operator==( const error_code & lhs, const error_code & rhs );</pre>
|
||||
@ -783,7 +791,7 @@ application program interfaces.</p>
|
||||
<hr>
|
||||
|
||||
<p>Revised
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 05, 2008<!--webbot bot="Timestamp" endspan i-checksum="30983" --> </font>
|
||||
<!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%B %d, %Y" startspan -->October 08, 2008<!--webbot bot="Timestamp" endspan i-checksum="30989" --> </font>
|
||||
</p>
|
||||
|
||||
<p><EFBFBD> Copyright Beman Dawes, 2006, 2007, 2008</p>
|
||||
|
Reference in New Issue
Block a user