| 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 /** | 5 /** |
| 6 * An [OSError] object holds information about an error from the | 6 * An [OSError] object holds information about an error from the |
| 7 * operating system. | 7 * operating system. |
| 8 */ | 8 */ |
| 9 class OSError { | 9 class OSError { |
| 10 static final int noErrorCode = -1; | 10 static final int noErrorCode = -1; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 final String message; | 35 final String message; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Error code supplied by the operating system. Will have the value | 38 * Error code supplied by the operating system. Will have the value |
| 39 * [noErrorCode] if there is no error code associated with the error. | 39 * [noErrorCode] if there is no error code associated with the error. |
| 40 */ | 40 */ |
| 41 final int errorCode; | 41 final int errorCode; |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 /** | |
| 46 * Utility for creating an OSError instance. NOTE: This will go away | |
| 47 * soon, so please don't use this utility function. The reason for | |
| 48 * having it temporarily is that the Dart C API does not currently | |
| 49 * support constructing objects. | |
| 50 */ | |
| 51 // TODO(sgjesse): Remove this once Dart constructors can be invoked | 45 // TODO(sgjesse): Remove this once Dart constructors can be invoked |
| 52 // through the API. | 46 // through the API. |
| 53 class IOUtils { | 47 OSError _makeOSError(message, code) => new OSError(message, code); |
| 54 static OSError makeOSError(message, code) => new OSError(message, code); | |
| 55 } | |
| OLD | NEW |