Timeline for Should a C++ program catch all exceptions and prevent exceptions from bubbling up past main()?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 5, 2016 at 0:15 | comment | added | PerryC | That in-your-face error dialog can be configured on/off in the registry for what that's worth -- but you would need control of the registry to do this -- and most programs aren't running in kiosk mode (having taken over the OS). | |
| Jan 31, 2016 at 8:20 | comment | added | Martin Ba | You only loose control within the scope of std C++. An implementation specific way to handle such "crashes" should be available. C++ doen't usually run in a vacuum. | |
| Jan 30, 2016 at 22:29 | history | edited | user22815 | CC BY-SA 3.0 |
edited body
|
| Jan 30, 2016 at 9:59 | comment | added | Bart van Ingen Schenau | @Praxeolitic: It is more that the OS sets conventions and the compiler generates code to fulfill those conventions when a program terminates unexpectedly. The bottom-line is that unexpected program termination should be avoided whenever reasonably possible. | |
| Jan 30, 2016 at 9:53 | comment | added | Praxeolitic |
Are you sure the default behavior of a C++ exception that leaves main() has much to do with the OS? The OS might know nothing of C++. My guess was that it's determined by code the compiler inserts somewhere into the program.
|
|
| Jan 30, 2016 at 9:48 | history | answered | Bart van Ingen Schenau | CC BY-SA 3.0 |