mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-09 12:45:40 -05:00
10 lines
276 B
OCaml
10 lines
276 B
OCaml
exception Bad_req of int * string
|
|
|
|
let spf = Printf.sprintf
|
|
let bad_reqf c fmt = Printf.ksprintf (fun s -> raise (Bad_req (c, s))) fmt
|
|
|
|
type 'a resp_result = ('a, int * string) result
|
|
|
|
let unwrap_resp_result = function
|
|
| Ok x -> x
|
|
| Error (c, s) -> raise (Bad_req (c, s))
|