| 90 | } |
| 91 | |
| 92 | CommandErrorType 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 | |
| 108 | bool CommandError::hasCmd() const { |
| 109 | return hasCommand(); |
nothing calls this directly
no outgoing calls
no test coverage detected