xref: /netbsd-src/external/gpl3/gcc.old/dist/libstdc++-v3/doc/xml/manual/using_exceptions.xml (revision c0a68be459da21030695f60d10265c2fc49758f8)
11debfc3dSmrg<section xmlns="http://docbook.org/ns/docbook" version="5.0"
21debfc3dSmrg	 xml:id="manual.intro.using.exceptions" xreflabel="Using Exceptions">
31debfc3dSmrg<?dbhtml filename="using_exceptions.html"?>
41debfc3dSmrg
51debfc3dSmrg<info><title>Exceptions</title>
61debfc3dSmrg  <keywordset>
71debfc3dSmrg    <keyword>C++</keyword>
81debfc3dSmrg    <keyword>exception</keyword>
91debfc3dSmrg    <keyword>error</keyword>
101debfc3dSmrg    <keyword>exception neutrality</keyword>
111debfc3dSmrg    <keyword>exception safety</keyword>
121debfc3dSmrg    <keyword>exception propagation</keyword>
131debfc3dSmrg    <keyword>-fno-exceptions</keyword>
141debfc3dSmrg  </keywordset>
151debfc3dSmrg</info>
161debfc3dSmrg
171debfc3dSmrg<para>
181debfc3dSmrgThe C++ language provides language support for stack unwinding
191debfc3dSmrgwith <literal>try</literal> and <literal>catch</literal> blocks and
201debfc3dSmrgthe <literal>throw</literal> keyword.
211debfc3dSmrg</para>
221debfc3dSmrg
231debfc3dSmrg<para>
241debfc3dSmrgThese are very powerful constructs, and require some thought when
251debfc3dSmrgapplied to the standard library in order to yield components that work
261debfc3dSmrgefficiently while cleaning up resources when unexpectedly killed via
271debfc3dSmrgexceptional circumstances.
281debfc3dSmrg</para>
291debfc3dSmrg
301debfc3dSmrg<para>
311debfc3dSmrgTwo general topics of discussion follow:
321debfc3dSmrgexception neutrality and exception safety.
331debfc3dSmrg</para>
341debfc3dSmrg
351debfc3dSmrg
361debfc3dSmrg<section xml:id="intro.using.exception.safety" xreflabel="Exception Safety"><info><title>Exception Safety</title></info>
371debfc3dSmrg
381debfc3dSmrg
391debfc3dSmrg  <para>
401debfc3dSmrg    What is exception-safe code?
411debfc3dSmrg  </para>
421debfc3dSmrg
431debfc3dSmrg  <para>
441debfc3dSmrg    Will define this as reasonable and well-defined behavior by classes
451debfc3dSmrg    and functions from the standard library when used by user-defined
461debfc3dSmrg    classes and functions that are themselves exception safe.
471debfc3dSmrg  </para>
481debfc3dSmrg
491debfc3dSmrg  <para>
501debfc3dSmrg    Please note that using exceptions in combination with templates
511debfc3dSmrg    imposes an additional requirement for exception
521debfc3dSmrg    safety. Instantiating types are required to have destructors that
531debfc3dSmrg    do no throw.
541debfc3dSmrg  </para>
551debfc3dSmrg
561debfc3dSmrg  <para>
571debfc3dSmrg    Using the layered approach from Abrahams, can classify library
581debfc3dSmrg    components as providing set levels of safety. These will be called
591debfc3dSmrg    exception guarantees, and can be divided into three categories.
601debfc3dSmrg  </para>
611debfc3dSmrg
621debfc3dSmrg<itemizedlist>
631debfc3dSmrg
641debfc3dSmrg  <listitem>
651debfc3dSmrg  <para>
661debfc3dSmrg    One. Don't throw.
671debfc3dSmrg  </para>
681debfc3dSmrg  <para>
691debfc3dSmrg    As specified in 23.2.1 general container requirements. Applicable
701debfc3dSmrg    to container and string classes.
711debfc3dSmrg  </para>
721debfc3dSmrg  <para>
731debfc3dSmrg    Member
741debfc3dSmrg    functions <function>erase</function>, <function>pop_back</function>, <function>pop_front</function>, <function>swap</function>, <function>clear</function>. And <type>iterator</type>
751debfc3dSmrg    copy constructor and assignment operator.
761debfc3dSmrg  </para>
771debfc3dSmrg  </listitem>
781debfc3dSmrg
791debfc3dSmrg  <listitem>
801debfc3dSmrg  <para>
811debfc3dSmrg    Two. Don't leak resources when exceptions are thrown. This is
821debfc3dSmrg    also referred to as the <quote>basic</quote> exception safety guarantee.
831debfc3dSmrg  </para>
841debfc3dSmrg
851debfc3dSmrg  <para>
861debfc3dSmrg    This applicable throughout the standard library.
871debfc3dSmrg  </para>
881debfc3dSmrg  </listitem>
891debfc3dSmrg
901debfc3dSmrg  <listitem>
911debfc3dSmrg  <para>
921debfc3dSmrg    Three. Commit-or-rollback semantics.  This is
931debfc3dSmrg    referred to as <quote>strong</quote> exception safety guarantee.
941debfc3dSmrg  </para>
951debfc3dSmrg
961debfc3dSmrg  <para>
971debfc3dSmrg    As specified in 23.2.1 general container requirements. Applicable
981debfc3dSmrg    to container and string classes.
991debfc3dSmrg  </para>
1001debfc3dSmrg  <para>
1011debfc3dSmrg    Member functions <function>insert</function> of a single
1021debfc3dSmrg    element, <function>push_back</function>, <function>push_front</function>,
1031debfc3dSmrg    and <function>rehash</function>.
1041debfc3dSmrg  </para>
1051debfc3dSmrg
1061debfc3dSmrg  </listitem>
1071debfc3dSmrg</itemizedlist>
1081debfc3dSmrg
1091debfc3dSmrg</section>
1101debfc3dSmrg
1111debfc3dSmrg
1121debfc3dSmrg<section xml:id="intro.using.exception.propagating" xreflabel="Exceptions Neutrality"><info><title>Exception Neutrality</title></info>
1131debfc3dSmrg
1141debfc3dSmrg  <para>
1151debfc3dSmrg    Simply put, once thrown an exception object should continue in
1161debfc3dSmrg    flight unless handled explicitly. In practice, this means
1171debfc3dSmrg    propagating exceptions should not be swallowed in
1181debfc3dSmrg    gratuitous <literal>catch(...)</literal> blocks. Instead,
1191debfc3dSmrg    matching <literal>try</literal> and <literal>catch</literal>
1201debfc3dSmrg    blocks should have specific catch handlers and allow un-handed
1211debfc3dSmrg    exception objects to propagate. If a
1221debfc3dSmrg    terminating <literal>catch(...)</literal> blocks exist then it
1231debfc3dSmrg    should end with a <literal>throw</literal> to re-throw the current
1241debfc3dSmrg    exception.
1251debfc3dSmrg  </para>
1261debfc3dSmrg
1271debfc3dSmrg  <para>
1281debfc3dSmrg    Why do this?
1291debfc3dSmrg  </para>
1301debfc3dSmrg
1311debfc3dSmrg  <para>
1321debfc3dSmrg    By allowing exception objects to propagate, a more flexible
1331debfc3dSmrg    approach to error handling is made possible (although not
1341debfc3dSmrg    required.) Instead of dealing with an error immediately, one can
1351debfc3dSmrg    allow the exception to propagate up until sufficient context is
1361debfc3dSmrg    available and the choice of exiting or retrying can be made in an
1371debfc3dSmrg    informed manner.
1381debfc3dSmrg  </para>
1391debfc3dSmrg
1401debfc3dSmrg  <para>
1411debfc3dSmrg    Unfortunately, this tends to be more of a guideline than a strict
1421debfc3dSmrg    rule as applied to the standard library. As such, the following is
1431debfc3dSmrg    a list of known problem areas where exceptions are not propagated.
1441debfc3dSmrg  </para>
1451debfc3dSmrg
1461debfc3dSmrg<itemizedlist>
1471debfc3dSmrg  <listitem>
1481debfc3dSmrg    <para>
1491debfc3dSmrg      Input/Output
1501debfc3dSmrg    </para>
1511debfc3dSmrg  <para>
1521debfc3dSmrg    The destructor <function>ios_base::Init::~Init()</function>
1531debfc3dSmrg    swallows all exceptions from <function>flush</function> called on
1541debfc3dSmrg    all open streams at termination.
1551debfc3dSmrg  </para>
1561debfc3dSmrg
1571debfc3dSmrg  <para>
1581debfc3dSmrg    All formatted input in <classname>basic_istream</classname> or
1591debfc3dSmrg    formatted output in <classname>basic_ostream</classname> can be
1601debfc3dSmrg    configured to swallow exceptions
1611debfc3dSmrg    when <function>exceptions</function> is set to
1621debfc3dSmrg    ignore <type>ios_base::badbit</type>.
1631debfc3dSmrg  </para>
1641debfc3dSmrg
1651debfc3dSmrg  <para>
1661debfc3dSmrg    Functions that have been registered
1671debfc3dSmrg    with <function>ios_base::register_callback</function> swallow all
1681debfc3dSmrg    exceptions when called as part of a callback event.
1691debfc3dSmrg  </para>
1701debfc3dSmrg
1711debfc3dSmrg  <para>
1721debfc3dSmrg    When closing the underlying
1731debfc3dSmrg    file, <function>basic_filebuf::close</function> will swallow
1741debfc3dSmrg    (non-cancellation) exceptions thrown and return <literal>NULL</literal>.
1751debfc3dSmrg  </para>
1761debfc3dSmrg  </listitem>
1771debfc3dSmrg  <listitem>
1781debfc3dSmrg    <para>
1791debfc3dSmrg      Thread
1801debfc3dSmrg    </para>
1811debfc3dSmrg    <para>
1821debfc3dSmrg      The constructors of <classname>thread</classname> that take a
1831debfc3dSmrg      callable function argument swallow all exceptions resulting from
1841debfc3dSmrg      executing the function argument.
1851debfc3dSmrg    </para>
1861debfc3dSmrg  </listitem>
1871debfc3dSmrg</itemizedlist>
1881debfc3dSmrg
1891debfc3dSmrg</section>
1901debfc3dSmrg
1911debfc3dSmrg<section xml:id="intro.using.exception.no" xreflabel="-fno-exceptions"><info><title>Doing without</title></info>
1921debfc3dSmrg
1931debfc3dSmrg  <para>
1941debfc3dSmrg    C++ is a language that strives to be as efficient as is possible
1951debfc3dSmrg    in delivering features. As such, considerable care is used by both
1961debfc3dSmrg    language implementer and designers to make sure unused features
1971debfc3dSmrg    not impose hidden or unexpected costs. The GNU system tries to be
1981debfc3dSmrg    as flexible and as configurable as possible. So, it should come as
1991debfc3dSmrg    no surprise that GNU C++ provides an optional language extension,
2001debfc3dSmrg    spelled <literal>-fno-exceptions</literal>, as a way to excise the
2011debfc3dSmrg    implicitly generated magic necessary to
2021debfc3dSmrg    support <literal>try</literal> and <literal>catch</literal> blocks
2031debfc3dSmrg    and thrown objects. (Language support
2041debfc3dSmrg    for <literal>-fno-exceptions</literal> is documented in the GNU
2051debfc3dSmrg    GCC <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options">manual</link>.)
2061debfc3dSmrg  </para>
2071debfc3dSmrg
2081debfc3dSmrg  <para>Before detailing the library support
2091debfc3dSmrg    for <literal>-fno-exceptions</literal>, first a passing note on
2101debfc3dSmrg    the things lost when this flag is used: it will break exceptions
2111debfc3dSmrg    trying to pass through code compiled
2121debfc3dSmrg    with <literal>-fno-exceptions</literal> whether or not that code
2131debfc3dSmrg    has any <literal>try</literal> or <literal>catch</literal>
2141debfc3dSmrg    constructs. If you might have some code that throws, you shouldn't
2151debfc3dSmrg    use <literal>-fno-exceptions</literal>. If you have some code that
2161debfc3dSmrg    uses <literal>try</literal> or <literal>catch</literal>, you
2171debfc3dSmrg    shouldn't use <literal>-fno-exceptions</literal>.
2181debfc3dSmrg  </para>
2191debfc3dSmrg
2201debfc3dSmrg  <para>
2211debfc3dSmrg    And what it to be gained, tinkering in the back alleys with a
2221debfc3dSmrg    language like this? Exception handling overhead can be measured
2231debfc3dSmrg    in the size of the executable binary, and varies with the
2241debfc3dSmrg    capabilities of the underlying operating system and specific
2251debfc3dSmrg    configuration of the C++ compiler. On recent hardware with GNU
2261debfc3dSmrg    system software of the same age, the combined code and data size
2271debfc3dSmrg    overhead for enabling exception handling is around 7%. Of course,
2281debfc3dSmrg    if code size is of singular concern than using the appropriate
2291debfc3dSmrg    optimizer setting with exception handling enabled
2301debfc3dSmrg    (ie, <literal>-Os -fexceptions</literal>) may save up to twice
2311debfc3dSmrg    that, and preserve error checking.
2321debfc3dSmrg  </para>
2331debfc3dSmrg
2341debfc3dSmrg  <para>
2351debfc3dSmrg    So. Hell bent, we race down the slippery track, knowing the brakes
2361debfc3dSmrg    are a little soft and that the right front wheel has a tendency to
2371debfc3dSmrg    wobble at speed. Go on: detail the standard library support
2381debfc3dSmrg    for <literal>-fno-exceptions</literal>.
2391debfc3dSmrg  </para>
2401debfc3dSmrg
2411debfc3dSmrg  <para>
2421debfc3dSmrg    In sum, valid C++ code with exception handling is transformed into
2431debfc3dSmrg    a dialect without exception handling. In detailed steps: all use
2441debfc3dSmrg    of the C++
2451debfc3dSmrg    keywords <literal>try</literal>, <literal>catch</literal>,
2461debfc3dSmrg    and <literal>throw</literal> in the standard library have been
2471debfc3dSmrg    permanently replaced with the pre-processor controlled equivalents
2481debfc3dSmrg    spelled <literal>__try</literal>, <literal>__catch</literal>,
2491debfc3dSmrg    and <literal>__throw_exception_again</literal>. They are defined
2501debfc3dSmrg    as follows.
2511debfc3dSmrg  </para>
2521debfc3dSmrg
2531debfc3dSmrg<programlisting>
2541debfc3dSmrg#if __cpp_exceptions
2551debfc3dSmrg# define __try      try
2561debfc3dSmrg# define __catch(X) catch(X)
2571debfc3dSmrg# define __throw_exception_again throw
2581debfc3dSmrg#else
2591debfc3dSmrg# define __try      if (true)
2601debfc3dSmrg# define __catch(X) if (false)
2611debfc3dSmrg# define __throw_exception_again
2621debfc3dSmrg#endif
2631debfc3dSmrg</programlisting>
2641debfc3dSmrg
2651debfc3dSmrg<para>
2661debfc3dSmrg  In addition, for every object derived from
2671debfc3dSmrg  class <classname>exception</classname>, there exists a corresponding
2681debfc3dSmrg  function with C language linkage. An example:
2691debfc3dSmrg</para>
2701debfc3dSmrg
2711debfc3dSmrg<programlisting>
2721debfc3dSmrg#if __cpp_exceptions
2731debfc3dSmrg  void __throw_bad_exception(void)
2741debfc3dSmrg  { throw bad_exception(); }
2751debfc3dSmrg#else
2761debfc3dSmrg  void __throw_bad_exception(void)
2771debfc3dSmrg  { abort(); }
2781debfc3dSmrg#endif
2791debfc3dSmrg</programlisting>
2801debfc3dSmrg
2811debfc3dSmrg<para>
2821debfc3dSmrg  The last language feature needing to be transformed
2831debfc3dSmrg  by <literal>-fno-exceptions</literal> is treatment of exception
2841debfc3dSmrg  specifications on member functions. Fortunately, the compiler deals
2851debfc3dSmrg  with this by ignoring exception specifications and so no alternate
2861debfc3dSmrg  source markup is needed.
2871debfc3dSmrg</para>
2881debfc3dSmrg
2891debfc3dSmrg<para>
2901debfc3dSmrg  By using this combination of language re-specification by the
2911debfc3dSmrg  compiler, and the pre-processor tricks and the functional
2921debfc3dSmrg  indirection layer for thrown exception objects by the library,
2931debfc3dSmrg  libstdc++ files can be compiled
2941debfc3dSmrg  with <literal>-fno-exceptions</literal>.
2951debfc3dSmrg</para>
2961debfc3dSmrg
2971debfc3dSmrg<para>
2981debfc3dSmrg User code that uses C++ keywords
2991debfc3dSmrg like <literal>throw</literal>, <literal>try</literal>,
3001debfc3dSmrg and <literal>catch</literal> will produce errors even if the user
3011debfc3dSmrg code has included libstdc++ headers and is using constructs
3021debfc3dSmrg like <classname>basic_iostream</classname>. Even though the standard
3031debfc3dSmrg library has been transformed, user code may need modification. User
3041debfc3dSmrg  code that attempts or expects to do error checking on standard
3051debfc3dSmrg  library components compiled with exception handling disabled should
3061debfc3dSmrg  be evaluated and potentially made conditional.
3071debfc3dSmrg</para>
3081debfc3dSmrg
3091debfc3dSmrg<para>
3101debfc3dSmrg  Some issues remain with this approach (see bugzilla entry
3111debfc3dSmrg  25191). Code paths are not equivalent, in
3121debfc3dSmrg  particular <literal>catch</literal> blocks are not evaluated. Also
3131debfc3dSmrg  problematic are <literal>throw</literal> expressions expecting a
3141debfc3dSmrg  user-defined throw handler. Known problem areas in the standard
3151debfc3dSmrg  library include using an instance
3161debfc3dSmrg  of <classname>basic_istream</classname>
3171debfc3dSmrg  with <function>exceptions</function> set to specific
3181debfc3dSmrg  <type>ios_base::iostate</type> conditions, or
3191debfc3dSmrg  cascading <literal>catch</literal> blocks that dispatch error
3201debfc3dSmrg  handling or recovery efforts based on the type of exception object
3211debfc3dSmrg  thrown.
3221debfc3dSmrg</para>
3231debfc3dSmrg
3241debfc3dSmrg<para>
3251debfc3dSmrg  Oh, and by the way: none of this hackery is at all
3261debfc3dSmrg  special. (Although perhaps well-deserving of a raised eyebrow.)
3271debfc3dSmrg  Support continues to evolve and may change in the future. Similar
3281debfc3dSmrg  and even additional techniques are used in other C++ libraries and
3291debfc3dSmrg  compilers.
3301debfc3dSmrg</para>
3311debfc3dSmrg
3321debfc3dSmrg<para>
3331debfc3dSmrg C++ hackers with a bent for language and control-flow purity have
3341debfc3dSmrg  been successfully consoled by grizzled C veterans lamenting the
3351debfc3dSmrg  substitution of the C language keyword
3361debfc3dSmrg  <literal>const</literal> with the uglified
3371debfc3dSmrg  doppelganger <literal>__const</literal>.
3381debfc3dSmrg</para>
3391debfc3dSmrg
3401debfc3dSmrg
3411debfc3dSmrg</section>
3421debfc3dSmrg
3431debfc3dSmrg<section xml:id="intro.using.exception.compat"><info><title>Compatibility</title></info>
3441debfc3dSmrg
3451debfc3dSmrg
3461debfc3dSmrg<section xml:id="using.exception.compat.c"><info><title>With <literal>C</literal></title></info>
3471debfc3dSmrg
3481debfc3dSmrg<para>
3491debfc3dSmrg  C language code that is expecting to interoperate with C++ should be
3501debfc3dSmrg  compiled with <literal>-fexceptions</literal>. This will make
3511debfc3dSmrg  debugging a C language function called as part of C++-induced stack
3521debfc3dSmrg  unwinding possible.
3531debfc3dSmrg</para>
3541debfc3dSmrg
3551debfc3dSmrg<para>
3561debfc3dSmrg  In particular, unwinding into a frame with no exception handling
3571debfc3dSmrgdata will cause a runtime abort. If the unwinder runs out of unwind
3581debfc3dSmrginfo before it finds a handler, <function>std::terminate()</function>
3591debfc3dSmrgis called.
3601debfc3dSmrg</para>
3611debfc3dSmrg
3621debfc3dSmrg<para>
3631debfc3dSmrg  Please note that most development environments should take care of
3641debfc3dSmrg  getting these details right. For GNU systems, all appropriate parts
3651debfc3dSmrg  of the GNU C library are already compiled
3661debfc3dSmrg  with <literal>-fexceptions</literal>.
3671debfc3dSmrg</para>
3681debfc3dSmrg
3691debfc3dSmrg</section>
3701debfc3dSmrg
3711debfc3dSmrg<section xml:id="using.exception.compat.posix"><info><title>With <literal>POSIX</literal> thread cancellation</title></info>
3721debfc3dSmrg
3731debfc3dSmrg
3741debfc3dSmrg<para>
3751debfc3dSmrg  GNU systems re-use some of the exception handling mechanisms to
3761debfc3dSmrg  track control flow for <literal>POSIX</literal> thread cancellation.
3771debfc3dSmrg</para>
3781debfc3dSmrg
3791debfc3dSmrg<para>
3801debfc3dSmrg  Cancellation points are functions defined by POSIX as worthy of
3811debfc3dSmrg  special treatment. The standard library may use some of these
3821debfc3dSmrg  functions to implement parts of the ISO C++ standard or depend on
3831debfc3dSmrg  them for extensions.
3841debfc3dSmrg</para>
3851debfc3dSmrg
3861debfc3dSmrg<para>
3871debfc3dSmrg  Of note:
3881debfc3dSmrg</para>
3891debfc3dSmrg
3901debfc3dSmrg<para>
3911debfc3dSmrg  <function>nanosleep</function>,
3921debfc3dSmrg  <function>read</function>, <function>write</function>, <function>open</function>, <function>close</function>,
3931debfc3dSmrg  and <function>wait</function>.
3941debfc3dSmrg</para>
3951debfc3dSmrg
3961debfc3dSmrg<para>
3971debfc3dSmrg  The parts of libstdc++ that use C library functions marked as
3981debfc3dSmrg  cancellation points should take pains to be exception neutral.
3991debfc3dSmrg  Failing this, <literal>catch</literal> blocks have been augmented to
4001debfc3dSmrg  show that the POSIX cancellation object is in flight.
4011debfc3dSmrg</para>
4021debfc3dSmrg
4031debfc3dSmrg<para>
4041debfc3dSmrg  This augmentation adds a <literal>catch</literal> block
4051debfc3dSmrg  for <classname>__cxxabiv1::__forced_unwind</classname>, which is the
4061debfc3dSmrg  object representing the POSIX cancellation object. Like so:
4071debfc3dSmrg</para>
4081debfc3dSmrg
4091debfc3dSmrg<programlisting>
4101debfc3dSmrg  catch(const __cxxabiv1::__forced_unwind&amp;)
4111debfc3dSmrg  {
4121debfc3dSmrg    this-&gt;_M_setstate(ios_base::badbit);
4131debfc3dSmrg    throw;
4141debfc3dSmrg  }
4151debfc3dSmrg  catch(...)
4161debfc3dSmrg  { this-&gt;_M_setstate(ios_base::badbit); }
4171debfc3dSmrg</programlisting>
4181debfc3dSmrg
4191debfc3dSmrg
4201debfc3dSmrg</section>
4211debfc3dSmrg</section>
4221debfc3dSmrg
4231debfc3dSmrg<bibliography xml:id="using.exceptions.biblio"><info><title>Bibliography</title></info>
4241debfc3dSmrg
4251debfc3dSmrg
4261debfc3dSmrg  <biblioentry>
4271debfc3dSmrg      <title>
4281debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
4291debfc3dSmrg	      xlink:href="http://www.opengroup.org/austin/">
4301debfc3dSmrg	System Interface Definitions, Issue 7 (IEEE Std. 1003.1-2008)
4311debfc3dSmrg	</link>
4321debfc3dSmrg      </title>
4331debfc3dSmrg
4341debfc3dSmrg
4351debfc3dSmrg    <pagenums>
4361debfc3dSmrg      2.9.5 Thread Cancellation
4371debfc3dSmrg    </pagenums>
4381debfc3dSmrg    <copyright>
4391debfc3dSmrg      <year>2008</year>
4401debfc3dSmrg      <holder>
4411debfc3dSmrg	The Open Group/The Institute of Electrical and Electronics
4421debfc3dSmrg	Engineers, Inc.
4431debfc3dSmrg      </holder>
4441debfc3dSmrg    </copyright>
4451debfc3dSmrg  </biblioentry>
4461debfc3dSmrg
4471debfc3dSmrg  <biblioentry>
4481debfc3dSmrg      <title>
4491debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
450*c0a68be4Smrg	      xlink:href="https://www.boost.org/community/error_handling.html">
4511debfc3dSmrg	Error and Exception Handling
4521debfc3dSmrg	</link>
4531debfc3dSmrg      </title>
4541debfc3dSmrg
4551debfc3dSmrg    <author><personname><firstname>David</firstname><surname>Abrahams </surname></personname></author>
4561debfc3dSmrg    <publisher>
4571debfc3dSmrg      <publishername>
4581debfc3dSmrg	Boost
4591debfc3dSmrg      </publishername>
4601debfc3dSmrg    </publisher>
4611debfc3dSmrg  </biblioentry>
4621debfc3dSmrg
4631debfc3dSmrg
4641debfc3dSmrg  <biblioentry>
4651debfc3dSmrg      <title>
4661debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
467*c0a68be4Smrg	      xlink:href="https://www.boost.org/community/exception_safety.html">
4681debfc3dSmrg	Exception-Safety in Generic Components
4691debfc3dSmrg	</link>
4701debfc3dSmrg      </title>
4711debfc3dSmrg
4721debfc3dSmrg    <author><personname><firstname>David</firstname><surname>Abrahams</surname></personname></author>
4731debfc3dSmrg    <publisher>
4741debfc3dSmrg      <publishername>
4751debfc3dSmrg	Boost
4761debfc3dSmrg      </publishername>
4771debfc3dSmrg    </publisher>
4781debfc3dSmrg  </biblioentry>
4791debfc3dSmrg
4801debfc3dSmrg  <biblioentry>
4811debfc3dSmrg      <title>
4821debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
4831debfc3dSmrg	      xlink:href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1997/N1077.pdf">
4841debfc3dSmrg	Standard Library Exception Policy
4851debfc3dSmrg	</link>
4861debfc3dSmrg      </title>
4871debfc3dSmrg
4881debfc3dSmrg    <author><personname><firstname>Matt</firstname><surname>Austern</surname></personname></author>
4891debfc3dSmrg    <publisher>
4901debfc3dSmrg      <publishername>
4911debfc3dSmrg	WG21 N1077
4921debfc3dSmrg      </publishername>
4931debfc3dSmrg    </publisher>
4941debfc3dSmrg  </biblioentry>
4951debfc3dSmrg
4961debfc3dSmrg  <biblioentry>
4971debfc3dSmrg      <title>
4981debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
4991debfc3dSmrg	      xlink:href="http://gcc.gnu.org/ml/gcc-patches/2001-03/msg00661.html">
5001debfc3dSmrg	ia64 c++ abi exception handling
5011debfc3dSmrg	</link>
5021debfc3dSmrg      </title>
5031debfc3dSmrg
5041debfc3dSmrg    <author><personname><firstname>Richard</firstname><surname>Henderson</surname></personname></author>
5051debfc3dSmrg    <publisher>
5061debfc3dSmrg      <publishername>
5071debfc3dSmrg	GNU
5081debfc3dSmrg      </publishername>
5091debfc3dSmrg    </publisher>
5101debfc3dSmrg  </biblioentry>
5111debfc3dSmrg
5121debfc3dSmrg  <biblioentry>
5131debfc3dSmrg      <title>
5141debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
5151debfc3dSmrg	      xlink:href="http://www.stroustrup.com/3rd_safe.pdf">
5161debfc3dSmrg	Appendix E: Standard-Library Exception Safety
5171debfc3dSmrg	</link>
5181debfc3dSmrg      </title>
5191debfc3dSmrg    <author><personname><firstname>Bjarne</firstname><surname>Stroustrup</surname></personname></author>
5201debfc3dSmrg  </biblioentry>
5211debfc3dSmrg
5221debfc3dSmrg  <biblioentry>
5231debfc3dSmrg    <citetitle>
5241debfc3dSmrg      Exceptional C++
5251debfc3dSmrg    </citetitle>
5261debfc3dSmrg    <pagenums>
5271debfc3dSmrg      Exception-Safety Issues and Techniques
5281debfc3dSmrg    </pagenums>
5291debfc3dSmrg    <author><personname><firstname>Herb</firstname><surname>Sutter</surname></personname></author>
5301debfc3dSmrg  </biblioentry>
5311debfc3dSmrg
5321debfc3dSmrg  <biblioentry>
5331debfc3dSmrg      <title>
5341debfc3dSmrg	<link xmlns:xlink="http://www.w3.org/1999/xlink"
5351debfc3dSmrg	      xlink:href="http://gcc.gnu.org/PR25191">
5361debfc3dSmrg      GCC Bug 25191: exception_defines.h #defines try/catch
5371debfc3dSmrg	</link>
5381debfc3dSmrg      </title>
5391debfc3dSmrg  </biblioentry>
5401debfc3dSmrg
5411debfc3dSmrg</bibliography>
5421debfc3dSmrg
5431debfc3dSmrg</section>
544