Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 09:09:15

0001 // Copyright (C) 2022 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 
0004 #ifndef QEXCEPTIONHANDLING_H
0005 #define QEXCEPTIONHANDLING_H
0006 
0007 #include <QtCore/qtconfigmacros.h>
0008 #include <QtCore/qcompilerdetection.h>
0009 #include <QtCore/qtcoreexports.h>
0010 
0011 #if 0
0012 #pragma qt_class(QtExceptionHandling)
0013 #pragma qt_sync_stop_processing
0014 #endif
0015 
0016 QT_BEGIN_NAMESPACE
0017 
0018 /* These wrap try/catch so we can switch off exceptions later.
0019 
0020    Beware - do not use more than one QT_CATCH per QT_TRY, and do not use
0021    the exception instance in the catch block.
0022    If you can't live with those constraints, don't use these macros.
0023    Use the QT_NO_EXCEPTIONS macro to protect your code instead.
0024 */
0025 #ifdef QT_NO_EXCEPTIONS
0026 #  define QT_TRY if (true)
0027 #  define QT_CATCH(A) else
0028 #  define QT_THROW(A) qt_noop()
0029 #  define QT_RETHROW qt_noop()
0030 #else
0031 #  define QT_TRY try
0032 #  define QT_CATCH(A) catch (A)
0033 #  define QT_THROW(A) throw A
0034 #  define QT_RETHROW throw
0035 #endif
0036 
0037 #if QT_CORE_REMOVED_SINCE(6, 9)
0038 Q_NORETURN Q_DECL_COLD_FUNCTION Q_CORE_EXPORT void qTerminate() noexcept;
0039 #endif
0040 
0041 QT_END_NAMESPACE
0042 
0043 #endif // QEXCEPTIONHANDLING_H