* Helper function to convert clockbound error kind codes into a human readable version. */
| 32 | * Helper function to convert clockbound error kind codes into a human readable version. |
| 33 | */ |
| 34 | char * 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. |
no outgoing calls
no test coverage detected