diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-16 18:08:57 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-19 09:59:21 -0700 |
| commit | dedac5eb3c657c39f9f328f303dc7ef01dd760c3 (patch) | |
| tree | 11494f8adbbaa8e954cfb5635db07b8f26d46d9d /src/libstd/process.rs | |
| parent | 12cb7c6a2847959460ecac75b2c983d071585472 (diff) | |
| download | rust-dedac5eb3c657c39f9f328f303dc7ef01dd760c3.tar.gz rust-dedac5eb3c657c39f9f328f303dc7ef01dd760c3.zip | |
std: Stablize io::ErrorKind
This commit stabilizes the `ErrorKind` enumeration which is consumed by and generated by the `io::Error` type. The purpose of this type is to serve as a cross-platform namespace to categorize errors into. Two specific issues are addressed as part of this stablization: * The naming of each variant was scrutinized and some were tweaked. An example is how `FileNotFound` was renamed to simply `NotFound`. These names should not show either a Unix or Windows bias and the set of names is intended to grow over time. For now the names will likely largely consist of those errors generated by the I/O APIs in the standard library. * The mapping of OS error codes onto kinds has been altered. Coalescing no longer occurs (multiple error codes become one kind). It is intended that each OS error code, if bound, corresponds to only one `ErrorKind`. The current set of error kinds was expanded slightly to include some networking errors. This commit also adds a `raw_os_error` function which returns an `Option<i32>` to extract the underlying raw error code from the `Error`.
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index df8a5d27c7f..cda37b19c48 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -668,7 +668,7 @@ mod tests { #[test] fn test_process_output_fail_to_start() { match Command::new("/no-binary-by-this-name-should-exist").output() { - Err(e) => assert_eq!(e.kind(), ErrorKind::FileNotFound), + Err(e) => assert_eq!(e.kind(), ErrorKind::NotFound), Ok(..) => panic!() } } |
