Port from std.error to std.result.