From 2524f1ce36c16bb6253e9d5ce156996290b830dc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 17 Sep 2003 12:06:36 +0000 Subject: [PATCH] added some trivial macros for exception handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/bakefiles/files.bkl | 1 + include/wx/except.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 include/wx/except.h diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 9d099716dc..9f2c973170 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -221,6 +221,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/dynload.h wx/encconv.h wx/event.h + wx/except.h wx/features.h wx/ffile.h wx/file.h diff --git a/include/wx/except.h b/include/wx/except.h new file mode 100644 index 0000000000..a80bbc34f7 --- /dev/null +++ b/include/wx/except.h @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/except.h +// Purpose: C++ exception related stuff +// Author: Vadim Zeitlin +// Modified by: +// Created: 17.09.2003 +// RCS-ID: $Id$ +// Copyright: (c) 2003 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_EXCEPT_H_ +#define _WX_EXCEPT_H_ + +#include "wx/defs.h" + +// ---------------------------------------------------------------------------- +// macros working whether wxUSE_EXCEPTIONS is 0 or 1 +// ---------------------------------------------------------------------------- + +#if wxUSE_EXCEPTIONS + #define wxTRY try + #define wxCATCH_ALL(code) catch ( ... ) { code } +#else // !wxUSE_EXCEPTIONS + #define wxTRY + #define wxCATCH_ALL(code) +#endif // wxUSE_EXCEPTIONS/!wxUSE_EXCEPTIONS + +#endif // _WX_EXCEPT_H_ +