Branch data Line data Source code
1 : : // Copyright 2019-2026 David Robillard <d@drobilla.net>
2 : : // SPDX-License-Identifier: ISC
3 : :
4 : : #include <exess/exess.h>
5 : :
6 : : static const char* const strings[] = {
7 : : "Success",
8 : : "Lossy operation",
9 : : "Expected \"false\", \"true\", \"0\" or \"1\"",
10 : : "Expected an integer value",
11 : : "Expected a duration starting with 'P'",
12 : : "Expected '-' or '+'",
13 : : "Expected a digit",
14 : : "Expected '0'",
15 : : "Expected ':'",
16 : : "Expected '-'",
17 : : "Expected 'T'",
18 : : "Expected 'H', 'M', or 'S'",
19 : : "Expected 'Y', 'M', or 'D'",
20 : : "Expected 'S'",
21 : : "Expected a hexadecimal character",
22 : : "Expected a base64 character",
23 : : "Invalid field order",
24 : : "Invalid value",
25 : : "Value out of range",
26 : : "Insufficient space",
27 : : "Unsupported value",
28 : : };
29 : :
30 : : EXESS_NONBLOCKING const char*
31 : 23 : exess_strerror(const ExessStatus status)
32 : : {
33 : : return ((unsigned)status <= (unsigned)EXESS_UNSUPPORTED) ? strings[status]
34 [ + + ]: 23 : : "Unknown error";
35 : : }
|