Blame


1 924d1172 2023-12-21 op // This is free and unencumbered software released into the public domain.
2 924d1172 2023-12-21 op //
3 924d1172 2023-12-21 op // Anyone is free to copy, modify, publish, use, compile, sell, or
4 924d1172 2023-12-21 op // distribute this software, either in source code form or as a compiled
5 924d1172 2023-12-21 op // binary, for any purpose, commercial or non-commercial, and by any
6 924d1172 2023-12-21 op // means.
7 924d1172 2023-12-21 op //
8 924d1172 2023-12-21 op // In jurisdictions that recognize copyright laws, the author or authors
9 924d1172 2023-12-21 op // of this software dedicate any and all copyright interest in the
10 924d1172 2023-12-21 op // software to the public domain. We make this dedication for the benefit
11 924d1172 2023-12-21 op // of the public at large and to the detriment of our heirs and
12 924d1172 2023-12-21 op // successors. We intend this dedication to be an overt act of
13 924d1172 2023-12-21 op // relinquishment in perpetuity of all present and future rights to this
14 924d1172 2023-12-21 op // software under copyright law.
15 924d1172 2023-12-21 op //
16 924d1172 2023-12-21 op // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 924d1172 2023-12-21 op // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 924d1172 2023-12-21 op // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 924d1172 2023-12-21 op // IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 924d1172 2023-12-21 op // OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 924d1172 2023-12-21 op // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 924d1172 2023-12-21 op // OTHER DEALINGS IN THE SOFTWARE.
23 924d1172 2023-12-21 op
24 924d1172 2023-12-21 op use io;
25 924d1172 2023-12-21 op
26 924d1172 2023-12-21 op export type badrequest = !void;
27 924d1172 2023-12-21 op export type error = !(io::error | badrequest);
28 924d1172 2023-12-21 op
29 924d1172 2023-12-21 op export fn strerror(err: error) str = {
30 924d1172 2023-12-21 op match (err) {
31 924d1172 2023-12-21 op case badrequest => return "Bad Request";
32 924d1172 2023-12-21 op case let err: io::error => return io::strerror(err);
33 924d1172 2023-12-21 op };
34 924d1172 2023-12-21 op };