W3cubDocs

/Dart 2

exitCode top-level property

int exitCode

Get the global exit code for the Dart VM.

The exit code is global for the Dart VM and the last assignment to exitCode from any isolate determines the exit code of the Dart VM on normal termination.

See exit for more information on how to chose a value for the exit code.

Implementation

int get exitCode => _ProcessUtils._getExitCode();
void exitCode= (int code)

Set the global exit code for the Dart VM.

The exit code is global for the Dart VM and the last assignment to exitCode from any isolate determines the exit code of the Dart VM on normal termination.

Default value is 0.

See exit for more information on how to chose a value for the exit code.

Implementation

void set exitCode(int code) {
  ArgumentError.checkNotNull(code, "code");
  _ProcessUtils._setExitCode(code);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-io/exitCode.html