7#include <QtCore/qlogging.h>
12#ifndef QT_NO_EXCEPTIONS
20# include <qt_windows.h>
37# if defined(Q_CC_MSVC)
38 if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
39 __fastfail(FAST_FAIL_FATAL_APP_EXIT);
41 RaiseFailFastException(
nullptr,
nullptr, 0);
45 TerminateProcess(GetCurrentProcess(), STATUS_FATAL_APP_EXIT);
55
56
57
58
59
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
111#if !defined(QT_BOOTSTRAPPED) || defined(QT_FORCE_ASSERTS) || !defined(QT_NO_DEBUG)
113
114
115void qt_assert(
const char *assertion,
const char *file,
int line)
noexcept
117 QMessageLogger(file, line,
nullptr)
118 .fatal(
"ASSERT: \"%s\" in file %s, line %d", assertion, file, line);
122
123
124void qt_assert_x(
const char *where,
const char *what,
const char *file,
int line)
noexcept
126 QMessageLogger(file, line,
nullptr)
127 .fatal(
"ASSERT failure in %s: \"%s\", file %s, line %d", where, what, file, line);
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
153
154
155
156
157
158
159
162
163
164
165
171 fputs(
"Out of memory", stderr);
172 fprintf(stderr,
" in %s, line %d\n", n, l);
178
179
180
181
184#ifndef QT_NO_EXCEPTIONS
185 throw std::bad_alloc();
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
212
213
214
215
216
217
218
219
220
221
222
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
261
262
263
264
265
266
267
268
269
270
271
272
273
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