MCPcopy Create free account
hub / github.com/arrayfire/forge / fg_err_to_string

Function fg_err_to_string

src/api/c/exception.cpp:17–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#include <algorithm>
16
17const char * fg_err_to_string(const fg_err err)
18{
19 switch(err)
20 {
21 case FG_ERR_NONE : return "Success";
22 case FG_ERR_SIZE : return "Invalid size";
23 case FG_ERR_INVALID_TYPE : return "Invalid type";
24 case FG_ERR_INVALID_ARG : return "Invalid argument";
25 case FG_ERR_GL_ERROR : return "OpenGL Error";
26 case FG_ERR_FREETYPE_ERROR : return "FreeType Error";
27 case FG_ERR_FILE_NOT_FOUND : return "File IO Error / File Not Found";
28 case FG_ERR_NOT_SUPPORTED : return "Function not supported";
29 case FG_ERR_NOT_CONFIGURED : return "Function not configured to build";
30 case FG_ERR_FONTCONFIG_ERROR : return "Font Config Error";
31 case FG_ERR_FREEIMAGE_UNKNOWN_FORMAT : return "FreeImage Error: Unknown Format";
32 case FG_ERR_FREEIMAGE_BAD_ALLOC : return "FreeImage Error: Bad Alloc";
33 case FG_ERR_FREEIMAGE_SAVE_FAILED : return "FreeImage Error: Save file failed";
34 case FG_ERR_INTERNAL : return "Internal Error";
35 case FG_ERR_RUNTIME : return "Runtime Error";
36 case FG_ERR_UNKNOWN :
37 default : return "Unknown Error";
38 }
39}
40
41void fg_get_last_error(char **msg, int *len)
42{

Callers 1

ErrorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected