]> git.saurik.com Git - wxWidgets.git/commitdiff
added some trivial macros for exception handling
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Sep 2003 12:06:36 +0000 (12:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 17 Sep 2003 12:06:36 +0000 (12:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

build/bakefiles/files.bkl
include/wx/except.h [new file with mode: 0644]

index 9d099716dc87f430fbd8ba68aa9fdb071f0b281b..9f2c9731709165f85db1e582c02e5129ed8e6137 100644 (file)
@@ -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 (file)
index 0000000..a80bbc3
--- /dev/null
@@ -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 <vadim@wxwindows.org>
+// 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_
+