MCPcopy Create free account
hub / github.com/SpacehuhnTech/SimpleCLI / getType

Method getType

src/CommandError.cpp:92–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92CommandErrorType CommandError::getType() const {
93 if (errorPointer) {
94 switch (errorPointer->mode) {
95 case CMD_NULL_PTR: return CommandErrorType::NULL_POINTER;
96 case CMD_EMPTY_LINE: return CommandErrorType::EMPTY_LINE;
97 case CMD_PARSE_SUCCESS: return CommandErrorType::PARSE_SUCCESSFUL;
98 case CMD_NOT_FOUND: return CommandErrorType::COMMAND_NOT_FOUND;
99 case CMD_UNKOWN_ARG: return CommandErrorType::UNKNOWN_ARGUMENT;
100 case CMD_MISSING_ARG: return CommandErrorType::MISSING_ARGUMENT;
101 case CMD_MISSING_ARG_VALUE: return CommandErrorType::MISSING_ARGUMENT_VALUE;
102 case CMD_UNCLOSED_QUOTE: return CommandErrorType::UNCLOSED_QUOTE;
103 }
104 }
105 return CommandErrorType::PARSE_SUCCESSFUL;
106}
107
108bool CommandError::hasCmd() const {
109 return hasCommand();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected