Exit cleanly from the application, passing the specified return code to
the OS and optionally printing the specified message to the console.
Calling exit() will properly unwind the stack and all the destructors
will be called. The method should be used only from the main application
thread, though, as it throws an ExitException which may not be handled
properly in other contexts.
Exit cleanly from the application, passing the specified return code to the OS and optionally printing the specified message to the console.
Calling exit() will properly unwind the stack and all the destructors will be called. The method should be used only from the main application thread, though, as it throws an ExitException which may not be handled properly in other contexts.