OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart_io; | |
6 | |
7 // TODO(ager): The only reason for this class is that we | 5 // TODO(ager): The only reason for this class is that we |
8 // cannot patch a top-level at this point. | 6 // cannot patch a top-level at this point. |
9 class _ProcessUtils { | 7 class _ProcessUtils { |
10 external static _exit(int status); | 8 external static _exit(int status); |
11 } | 9 } |
12 | 10 |
13 /** Exit the Dart VM process with the given [status] code. */ | 11 /** Exit the Dart VM process with the given [status] code. */ |
14 void exit(int status) { | 12 void exit(int status) { |
15 if (status is !int) { | 13 if (status is !int) { |
16 throw new ArgumentError("int status expected"); | 14 throw new ArgumentError("int status expected"); |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 /** | 237 /** |
240 * Contains the system message for the process exception if any. | 238 * Contains the system message for the process exception if any. |
241 */ | 239 */ |
242 final String message; | 240 final String message; |
243 | 241 |
244 /** | 242 /** |
245 * Contains the OS error code for the process exception if any. | 243 * Contains the OS error code for the process exception if any. |
246 */ | 244 */ |
247 final int errorCode; | 245 final int errorCode; |
248 } | 246 } |
OLD | NEW |