Something went wrong. Try again.
Correctness- and interoperability-oriented Tangled CLI
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647type category = | Usage | Configuration | Authentication | Authorization | Not_found | Conflict | Transport | Protocol | Consistency | External_tool | Internal
type t = { category : category; code : string; message : string }
let make ~category ~code ~message = { category; code; message }let category error = error.categorylet code error = error.codelet message error = error.message
let category_name = function | Usage -> "usage" | Configuration -> "configuration" | Authentication -> "authentication" | Authorization -> "authorization" | Not_found -> "not_found" | Conflict -> "conflict" | Transport -> "transport" | Protocol -> "protocol" | Consistency -> "consistency" | External_tool -> "external_tool" | Internal -> "internal"
let exit_code error = match error.category with | Usage -> 2 | Configuration -> 3 | Authentication -> 5 | Authorization -> 6 | Not_found -> 4 | Conflict -> 11 | Transport -> 7 | Protocol -> 8 | Consistency -> 10 | External_tool -> 9 | Internal -> 70