]> git.saurik.com Git - wxWidgets.git/blame - include/wx/except.h
Implement HasSelection for the OSX WebKit backend.
[wxWidgets.git] / include / wx / except.h
CommitLineData
2524f1ce
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/except.h
3// Purpose: C++ exception related stuff
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 17.09.2003
7// RCS-ID: $Id$
77ffb593 8// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
65571936 9// Licence: wxWindows licence
2524f1ce
VZ
10///////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_EXCEPT_H_
13#define _WX_EXCEPT_H_
14
15#include "wx/defs.h"
16
17// ----------------------------------------------------------------------------
18// macros working whether wxUSE_EXCEPTIONS is 0 or 1
19// ----------------------------------------------------------------------------
20
06b76f7e
VZ
21// even if the library itself was compiled with exceptions support, the user
22// code using it might be compiling with a compiler switch disabling them in
23// which cases we shouldn't use try/catch in the headers -- this results in
24// compilation errors in e.g. wx/scopeguard.h with at least g++ 4
25#if !wxUSE_EXCEPTIONS || \
26 (defined(__GNUG__) && !defined(__EXCEPTIONS))
d886c20e
VZ
27 #ifndef wxNO_EXCEPTIONS
28 #define wxNO_EXCEPTIONS
29 #endif
06b76f7e
VZ
30#endif
31
32#ifdef wxNO_EXCEPTIONS
2524f1ce
VZ
33 #define wxTRY
34 #define wxCATCH_ALL(code)
06b76f7e
VZ
35#else // do use exceptions
36 #define wxTRY try
37 #define wxCATCH_ALL(code) catch ( ... ) { code }
38#endif // wxNO_EXCEPTIONS/!wxNO_EXCEPTIONS
2524f1ce
VZ
39
40#endif // _WX_EXCEPT_H_
41