OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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; | 5 part of dart.io; |
6 | 6 |
7 // TODO(ager): The only reason for this class is that we | 7 // TODO(ager): The only reason for this class is that we |
8 // cannot patch a top-level at this point. | 8 // cannot patch a top-level at this point. |
9 class _ProcessUtils { | 9 class _ProcessUtils { |
10 external static void _exit(int status); | 10 external static void _exit(int status); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 static const ProcessSignal SIGVTALRM = const ProcessSignal._signal(26); | 248 static const ProcessSignal SIGVTALRM = const ProcessSignal._signal(26); |
249 static const ProcessSignal SIGPROF = const ProcessSignal._signal(27); | 249 static const ProcessSignal SIGPROF = const ProcessSignal._signal(27); |
250 static const ProcessSignal SIGPOLL = const ProcessSignal._signal(29); | 250 static const ProcessSignal SIGPOLL = const ProcessSignal._signal(29); |
251 static const ProcessSignal SIGSYS = const ProcessSignal._signal(31); | 251 static const ProcessSignal SIGSYS = const ProcessSignal._signal(31); |
252 | 252 |
253 const ProcessSignal._signal(int this._signalNumber); | 253 const ProcessSignal._signal(int this._signalNumber); |
254 final int _signalNumber; | 254 final int _signalNumber; |
255 } | 255 } |
256 | 256 |
257 | 257 |
258 class ProcessException implements Exception { | 258 class ProcessException implements IOException { |
259 const ProcessException(String this.executable, | 259 const ProcessException(String this.executable, |
260 List<String> this.arguments, | 260 List<String> this.arguments, |
261 [String this.message = "", | 261 [String this.message = "", |
262 int this.errorCode = 0]); | 262 int this.errorCode = 0]); |
263 String toString() { | 263 String toString() { |
264 var msg = (message == null) ? 'OS error code: $errorCode' : message; | 264 var msg = (message == null) ? 'OS error code: $errorCode' : message; |
265 var args = arguments.join(' '); | 265 var args = arguments.join(' '); |
266 return "ProcessException: $msg\n Command: $executable $args"; | 266 return "ProcessException: $msg\n Command: $executable $args"; |
267 } | 267 } |
268 | 268 |
(...skipping 10 matching lines...) Expand all Loading... |
279 /** | 279 /** |
280 * Contains the system message for the process exception if any. | 280 * Contains the system message for the process exception if any. |
281 */ | 281 */ |
282 final String message; | 282 final String message; |
283 | 283 |
284 /** | 284 /** |
285 * Contains the OS error code for the process exception if any. | 285 * Contains the OS error code for the process exception if any. |
286 */ | 286 */ |
287 final int errorCode; | 287 final int errorCode; |
288 } | 288 } |
OLD | NEW |