exit([exitCode])

Class: SwingUI.

Description:

Gracefully exits the application with specified exit code (status code) after closing connection to GUI and notifying GUI to gracefully exit too. Recommended way to exit, though not required.

Parameters:

Name Type Default Description

[exitCode]

number

0

Exit code.

Returns:

Does not return a value.

Type: void

Examples:

Exiting the app gracefully:

ui.exit();
ui.exit(10); // existing with exit code 10