Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.11.2
-
None
-
-
b6a5aff9b7781fb98529e9a4beab0c2f43ac55fe (qt/qtdoc/5.12)
Description
I have taken another look at a source code example.
... try { app.exec(); } catch (const std::bad_alloc &) { ... return 0; // exit the application }
I find the shown program error code questionable here after insufficient memory was detected.
Can the value "ENOMEM" (or "EXIT_FAILURE") be more appropriate for this use case?
Attachments
For Gerrit Dashboard: QTBUG-71587 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
245707,2 | Improve the exception safety code sample | 5.12 | qt/qtdoc | Status: MERGED | +2 | 0 |
245893,3 | Fix the usage of the ret variable in the exception safety code sample | 5.12 | qt/qtdoc | Status: MERGED | +2 | 0 |