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

Side by Side Diff: sdk/lib/io/process.dart

Issue 16123036: Clean up dart:io exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « sdk/lib/io/mime_multipart_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/io/mime_multipart_parser.dart ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698