caniadd/src/error.c

13 lines
233 B
C
Raw Permalink Normal View History

2022-01-08 19:53:58 +01:00
#include "error.h"
static const char *error_string[] = {
FE_ERROR(GEN_STRING)
};
const char *error_to_string(enum error err)
{
2022-01-08 20:36:22 +01:00
if (err >= _ERR_COUNT || err < 0)
2022-01-08 19:53:58 +01:00
return "ERR_UNKNOWN";
return error_string[err];
}