diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libstdc++-v3/doc/html/manual/diagnostics.html | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libstdc++-v3/doc/html/manual/diagnostics.html')
-rw-r--r-- | libstdc++-v3/doc/html/manual/diagnostics.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libstdc++-v3/doc/html/manual/diagnostics.html b/libstdc++-v3/doc/html/manual/diagnostics.html new file mode 100644 index 000000000..9c9abdfc2 --- /dev/null +++ b/libstdc++-v3/doc/html/manual/diagnostics.html @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter 5. Diagnostics</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.76.1"/><meta name="keywords" content=" ISO C++ , library "/><link rel="home" href="../spine.html" title="The GNU C++ Library"/><link rel="up" href="bk01pt02.html" title="Part II. Standard Contents"/><link rel="prev" href="termination.html" title="Termination"/><link rel="next" href="bk01pt02ch05s02.html" title="Concept Checking"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 5. + Diagnostics + +</th></tr><tr><td align="left"><a accesskey="p" href="termination.html">Prev</a> </td><th width="60%" align="center">Part II. + Standard Contents + </th><td align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr></table><hr/></div><div class="chapter" title="Chapter 5. Diagnostics"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics"/>Chapter 5. + Diagnostics + <a id="id472366" class="indexterm"/> +</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions">Exceptions</a></span></dt><dd><dl><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.api">API Reference</a></span></dt><dt><span class="section"><a href="diagnostics.html#std.diagnostics.exceptions.data">Adding Data to <code class="classname">exception</code></a></span></dt></dl></dd><dt><span class="section"><a href="bk01pt02ch05s02.html">Concept Checking</a></span></dt></dl></div><div class="section" title="Exceptions"><div class="titlepage"><div><div><h2 class="title"><a id="std.diagnostics.exceptions"/>Exceptions</h2></div></div></div><div class="section" title="API Reference"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.api"/>API Reference</h3></div></div></div><p> + All exception objects are defined in one of the standard header + files: <code class="filename">exception</code>, + <code class="filename">stdexcept</code>, <code class="filename">new</code>, and + <code class="filename">typeinfo</code>. + </p><p> + The base exception object is <code class="classname">exception</code>, + located in <code class="filename">exception</code>. This object has no + <code class="classname">string</code> member. + </p><p> + Derived from this are several classes that may have a + <code class="classname">string</code> member: a full hierarchy can be + found in the source documentation. + </p><p> + Full API details. + </p></div><div class="section" title="Adding Data to exception"><div class="titlepage"><div><div><h3 class="title"><a id="std.diagnostics.exceptions.data"/>Adding Data to <code class="classname">exception</code></h3></div></div></div><p> + The standard exception classes carry with them a single string as + data (usually describing what went wrong or where the 'throw' took + place). It's good to remember that you can add your own data to + these exceptions when extending the hierarchy: + </p><pre class="programlisting"> + struct My_Exception : public std::runtime_error + { + public: + My_Exception (const string& whatarg) + : std::runtime_error(whatarg), e(errno), id(GetDataBaseID()) { } + int errno_at_time_of_throw() const { return e; } + DBID id_of_thing_that_threw() const { return id; } + protected: + int e; + DBID id; // some user-defined type + }; + </pre></div></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td align="left"><a accesskey="p" href="termination.html">Prev</a> </td><td align="center"><a accesskey="u" href="bk01pt02.html">Up</a></td><td align="right"> <a accesskey="n" href="bk01pt02ch05s02.html">Next</a></td></tr><tr><td align="left" valign="top">Termination </td><td align="center"><a accesskey="h" href="../spine.html">Home</a></td><td align="right" valign="top"> Concept Checking</td></tr></table></div></body></html> |