removed useless spaces
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7,16 +7,16 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/*!
|
||||
|
||||
|
||||
@page exceptions_overview C++ exceptions overview
|
||||
|
||||
|
||||
#Introduction
|
||||
@ref exceptionstrategies_overview
|
||||
#Technicalities
|
||||
|
||||
|
||||
|
||||
|
||||
@section exceptionintroduction 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
|
||||
modern C++ libraries are. For instance, the library doesn't throw exceptions to
|
||||
@@ -28,10 +28,10 @@
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
@@ -40,27 +40,27 @@
|
||||
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
|
||||
not, you may override #OnUnhandledException()
|
||||
not, you may override #OnUnhandledException()
|
||||
in your wxApp-derived class to perform any clean up tasks. Note, however, that
|
||||
any information about the exact exception type is lost when this function is
|
||||
called, so if you need you should override #OnRun() and
|
||||
add a try/catch clause around the call of the base class version. This would
|
||||
allow you to catch any exceptions generated during the execution of the main
|
||||
event loop. To deal with the exceptions which may arise during the program
|
||||
startup and/or shutdown you should insert try/catch clauses in
|
||||
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
|
||||
exception handling code in #ProcessEvent
|
||||
exception handling code in #ProcessEvent
|
||||
method of this class. If this is impractical, you may also consider overriding
|
||||
the wxApp::HandleEvent() which allows you to handle
|
||||
all the exceptions thrown by any event handler.
|
||||
|
||||
|
||||
|
||||
|
||||
@section exceptionstechnicalities Technicalities
|
||||
|
||||
To use any kind of exception support in the library you need to build it with
|
||||
|
||||
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
|
||||
@@ -68,9 +68,9 @@
|
||||
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
|
||||
showing how to use it. Please look at its sources for further information.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user