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 /** Exit the Dart VM process with the given [status] code. */ | 5 /** Exit the Dart VM process with the given [status] code. */ |
6 void exit(int status) { | 6 void exit(int status) { |
7 if (status is !int) { | 7 if (status is !int) { |
8 throw new IllegalArgumentException("int status expected"); | 8 throw new ArgumentError("int status expected"); |
9 } | 9 } |
10 _exit(status); | 10 _exit(status); |
11 } | 11 } |
12 | 12 |
13 /** | 13 /** |
14 * [Process] is used to start new processes using the static | 14 * [Process] is used to start new processes using the static |
15 * [start] and [run] methods. | 15 * [start] and [run] methods. |
16 */ | 16 */ |
17 class Process { | 17 class Process { |
18 /** | 18 /** |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 /** | 235 /** |
236 * Contains the system message for the process exception if any. | 236 * Contains the system message for the process exception if any. |
237 */ | 237 */ |
238 final String message; | 238 final String message; |
239 | 239 |
240 /** | 240 /** |
241 * Contains the OS error code for the process exception if any. | 241 * Contains the OS error code for the process exception if any. |
242 */ | 242 */ |
243 final int errorCode; | 243 final int errorCode; |
244 } | 244 } |
OLD | NEW |