2 ms·
> can create a dedicated error that hold the path itself. Right making the standard library's error type far less useful if you have to start writing your own
by voidnap 3y ago
> can create a dedicated error that hold the path itself.
Right making the standard library's error type far less useful if you have to start writing your own error types lol. That's such an obnoxious design. The way it is now you can write programs that return and handle io errors just fine when they don't care about the path or other arguments. Your suggestion would require those programs to make a dedicated error type to unabstract away what is essentially a thin wrapper around errno. The value of a `std::io::Error` is still obviously appealing.