Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: runtime/bin/process.dart

Issue 11235054: Removed IllegalAccessException and UnsupportedOperationException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 ArgumentError("int status expected"); 8 throw new ArgumentError("int status expected");
9 } 9 }
10 _exit(status); 10 _exit(status);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 */ 45 */
46 static Future<ProcessResult> run(String executable, 46 static Future<ProcessResult> run(String executable,
47 List<String> arguments, 47 List<String> arguments,
48 [ProcessOptions options]) { 48 [ProcessOptions options]) {
49 return _Process.run(executable, arguments, options); 49 return _Process.run(executable, arguments, options);
50 } 50 }
51 51
52 /** 52 /**
53 * Returns an input stream of the process stdout. 53 * Returns an input stream of the process stdout.
54 * 54 *
55 * Throws an [UnsupportedOperationException] if the process is 55 * Throws an [StateError] if the process is
floitsch 2012/10/23 12:50:32 Throws a [StateError] ... ditto for all comments b
Lasse Reichstein Nielsen 2012/10/24 12:32:15 Fixed by changing StateError to UnsupportedError.
56 * non-interactive. 56 * non-interactive.
57 */ 57 */
58 abstract InputStream get stdout; 58 abstract InputStream get stdout;
59 59
60 /** 60 /**
61 * Returns an input stream of the process stderr. 61 * Returns an input stream of the process stderr.
62 * 62 *
63 * Throws an [UnsupportedOperationException] if the process is 63 * Throws an [StateError] if the process is
64 * non-interactive. 64 * non-interactive.
65 */ 65 */
66 abstract InputStream get stderr; 66 abstract InputStream get stderr;
67 67
68 /** 68 /**
69 * Returns an output stream to the process stdin. 69 * Returns an output stream to the process stdin.
70 * 70 *
71 * Throws an [UnsupportedOperationException] if the process is 71 * Throws an [StateError] if the process is
72 * non-interactive. 72 * non-interactive.
73 */ 73 */
74 abstract OutputStream get stdin; 74 abstract OutputStream get stdin;
75 75
76 /** 76 /**
77 * Sets an exit handler which gets invoked when the process 77 * Sets an exit handler which gets invoked when the process
78 * terminates. 78 * terminates.
79 * 79 *
80 * Throws an [UnsupportedOperationException] if the process is 80 * Throws an [StateError] if the process is
81 * non-interactive. 81 * non-interactive.
82 */ 82 */
83 abstract void set onExit(void callback(int exitCode)); 83 abstract void set onExit(void callback(int exitCode));
84 84
85 /** 85 /**
86 * On Windows, [kill] kills the process, ignoring the [signal] 86 * On Windows, [kill] kills the process, ignoring the [signal]
87 * flag. On Posix systems, [kill] sends [signal] to the 87 * flag. On Posix systems, [kill] sends [signal] to the
88 * process. Depending on the signal giving, it'll have different 88 * process. Depending on the signal giving, it'll have different
89 * meanings. When the process terminates as a result of calling 89 * meanings. When the process terminates as a result of calling
90 * [kill] [onExit] is called. If the kill operation fails an 90 * [kill] [onExit] is called. If the kill operation fails an
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 /** 219 /**
220 * Contains the system message for the process exception if any. 220 * Contains the system message for the process exception if any.
221 */ 221 */
222 final String message; 222 final String message;
223 223
224 /** 224 /**
225 * Contains the OS error code for the process exception if any. 225 * Contains the OS error code for the process exception if any.
226 */ 226 */
227 final int errorCode; 227 final int errorCode;
228 } 228 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698