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

Function format_err_kind

examples/client/c/src/clockbound_loop_forever.c:33–50  ·  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

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