DaemonApp.exit

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.

  1. void exit(int status, string msg)
    class DaemonApp
    override
    void
    exit
    (
    int status
    ,
    string msg = null
    )
  2. void exit(int status, string msg, Logger logger)

Parameters

status int

status code to return to the OS

msg string

optional message to show just before exiting

Meta