exit([exitCode], [signal])
Class: SwingUI.
Description:
Gracefully exits the application with specified exit code (status code) and optional exit signal. Emits onExit() event handlers, closes connection to GUI and notifies GUI to gracefully exit. This is a recommended way to exit the application.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
|
|
number |
0 |
Exit code. |
|
|
string |
One of received exit signals: |
Returns:
Does not return a value.
Type: void
Examples:
Exiting the app gracefully:
ui.exit();
ui.exit(10); // existing with exit code 10
