| 1068 | } |
| 1069 | |
| 1070 | const char *TextParsers::GetSMCErrorString(SMCError err) |
| 1071 | { |
| 1072 | static const char *s_errors[] = |
| 1073 | { |
| 1074 | NULL, |
| 1075 | "Stream failed to open", |
| 1076 | "Stream returned read error", |
| 1077 | NULL, |
| 1078 | "Un-quoted section has invalid tokens", |
| 1079 | "Section declared without header", |
| 1080 | "Section declared with unknown tokens", |
| 1081 | "Section ending without a matching section beginning", |
| 1082 | "Section beginning without a matching ending", |
| 1083 | "Line contained too many invalid tokens", |
| 1084 | "Token buffer overflowed", |
| 1085 | "A property was declared outside of a section", |
| 1086 | }; |
| 1087 | |
| 1088 | if (err < SMCError_Okay || err > SMCError_InvalidProperty1) |
| 1089 | { |
| 1090 | return NULL; |
| 1091 | } |
| 1092 | |
| 1093 | return s_errors[err]; |
| 1094 | } |
no outgoing calls
no test coverage detected