another batch of topic overviews reviewing (letters e,f)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-02-24 00:47:29 +00:00
parent f3b2b3e920
commit 3b88355f59
8 changed files with 333 additions and 810 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: exceptions
// Name: exceptions.h
// Purpose: topic overview
// Author: wxWidgets team
// RCS-ID: $Id$
@@ -8,14 +8,17 @@
/*!
@page exceptions_overview C++ exceptions overview
@page overview_exceptions C++ exceptions overview
#Introduction
@ref exceptionstrategies_overview
#Technicalities
@li @ref overview_exceptions_introduction
@li @ref overview_exceptions_strategies
@li @ref overview_exceptions_tech
@section exceptionintroduction Introduction
<hr>
@section overview_exceptions_introduction Introduction
wxWidgets had been started long before the exceptions were introduced in C++ so
it is not very surprising that it is not built around using them as some more
@@ -24,19 +27,21 @@
wxWidgets, even using the exceptions in the user code was dangerous because the
library code wasn't exception-safe and so an exception propagating through it
could result in memory and/or resource leaks, and also not very convenient.
Starting from the version 2.5.1 wxWidgets becomes more exception-friendly. It
still doesn't use the exceptions by itself but it should be now safe to use the
exceptions in the user code and the library tries to help you with this. Please
note that making the library exception-safe is still work in progress.
@section exceptionstrategies Strategies for exceptions handling
@section overview_exceptions_strategies Strategies for exceptions handling
There are several choice for using the exceptions in wxWidgets programs. First
of all, you may not use them at all. As stated above, the library doesn't throw
any exceptions by itself and so you don't have to worry about exceptions at all
unless your own code throws them. This is, of course, the simplest solution but
may be not the best one to deal with all possible errors.
Another strategy is to use exceptions only to signal truly fatal errors. In
this case you probably don't expect to recover from them and the default
behaviour -- to simply terminate the program -- may be appropriate. If it is
@@ -49,6 +54,7 @@
event loop. To deal with the exceptions which may arise during the program
startup and/or shutdown you should insert try/catch clauses in
#OnInit() and/or #OnExit() as well.
Finally, you may also want to continue running even when certain exceptions
occur. If all of your exceptions may happen only in the event handlers of a
single class (or only in the classes derived from it), you may centralize your
@@ -58,19 +64,19 @@
all the exceptions thrown by any event handler.
@section exceptionstechnicalities Technicalities
@section overview_exceptions_tech Technicalities
To use any kind of exception support in the library you need to build it with
@c wxUSE_EXCEPTIONS set to 1. This should be the case by default but
To use any kind of exception support in the library you need to build it
with @c wxUSE_EXCEPTIONS set to 1. This should be the case by default but
if it isn't, you should edit the @c include/wx/msw/setup.h file under
Windows or run @c configure with @c --enable-exceptions argument
under Unix.
On the other hand, if you do not plan to use exceptions, setting this
flag to 0 or using @c --disable-exceptions could result in a leaner and
slightly faster library.
As for any other library feature, there is a #sample
As for any other library feature, there is a sample (@c except)
showing how to use it. Please look at its sources for further information.
*/
*/