18 lines
517 B
Hare
18 lines
517 B
Hare
|
use io;
|
||
|
use net::dial;
|
||
|
|
||
|
// Errors possible while servicing HTTP requests. Note that these errors are for
|
||
|
// errors related to the processing of the HTTP connection; semantic HTTP errors
|
||
|
// such as [[STATUS_NOTFOUND]] are not handled by this type.
|
||
|
export type error = !(dial::error | io::error);
|
||
|
|
||
|
// Converts an [[error]] to a string.
|
||
|
export fn strerror(err: error) const str = {
|
||
|
match (err) {
|
||
|
case let err: dial::error =>
|
||
|
return dial::strerror(err);
|
||
|
case let err: io::error =>
|
||
|
return io::strerror(err);
|
||
|
};
|
||
|
};
|