#include <cat/cat.h>
const char *caterr_typestr(int major);
This function never returns NULL, but instead returns "Unknown"
on an invalid major code.
The error strings are statically allocated in the library and should not be manipulated or freed.