MCPcopy Create free account
hub / github.com/aws/clock-bound / format_err_kind

Function format_err_kind

examples/client/c/src/clockbound_now.c:34–51  ·  view source on GitHub ↗

* Helper function to convert clockbound error kind codes into a human readable version. */

Source from the content-addressed store, hash-verified

32 * Helper function to convert clockbound error kind codes into a human readable version.
33 */
34char * format_err_kind(clockbound_err_kind kind) {
35 switch (kind) {
36 case CLOCKBOUND_ERR_NONE:
37 return "No error";
38 case CLOCKBOUND_ERR_SYSCALL:
39 return "Syscall error";
40 case CLOCKBOUND_ERR_SEGMENT_NOT_INITIALIZED:
41 return "Segment not initialized error";
42 case CLOCKBOUND_ERR_SEGMENT_MALFORMED:
43 return "Segment malformed error";
44 case CLOCKBOUND_ERR_CAUSALITY_BREACH:
45 return "Causality breach error";
46 case CLOCKBOUND_ERR_SEGMENT_VERSION_NOT_SUPPORTED:
47 return "Segment version not supported error";
48 default:
49 return "BAD ERROR KIND";
50 }
51}
52
53/*
54 * Helper function to print out errors returned by libclockbound.

Callers 1

print_clockbound_errFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected