6#include <QtCore/qlogging.h>
11#ifndef QT_NO_EXCEPTIONS
19# include <qt_windows.h>
36# if defined(Q_CC_MSVC)
37 if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
38 __fastfail(FAST_FAIL_FATAL_APP_EXIT);
40 RaiseFailFastException(
nullptr,
nullptr, 0);
44 TerminateProcess(GetCurrentProcess(), STATUS_FATAL_APP_EXIT);
54
55
56
57
58
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
110#if !defined(QT_BOOTSTRAPPED) || defined(QT_FORCE_ASSERTS) || !defined(QT_NO_DEBUG)
112
113
114void qt_assert(
const char *assertion,
const char *file,
int line)
noexcept
116 QMessageLogger(file, line,
nullptr)
117 .fatal(
"ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
121
122
123void qt_assert_x(
const char *where,
const char *what,
const char *file,
int line)
noexcept
125 QMessageLogger(file, line,
nullptr)
126 .fatal(
"ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
152
153
154
155
156
157
158
161
162
163
164
170 fputs(
"Out of memory", stderr);
171 fprintf(stderr,
" in %s, line %d\n", n, l);
177
178
179
180
183#ifndef QT_NO_EXCEPTIONS
184 throw std::bad_alloc();
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
247
248
249
250
251
252
253
254
255
256
257
258
259
void qt_assert_x(const char *where, const char *what, const char *file, int line) noexcept
QT_BEGIN_NAMESPACE Q_NORETURN void qAbort()
void qt_check_pointer(const char *n, int l) noexcept