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

Method getError

src/SimpleCLI.cpp:215–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215CommandError SimpleCLI::getError() {
216 if (!errorQueue) return CommandError();
217
218 // "Pop" cmd_error pointer from queue
219 cmd_error* ptr = errorQueue;
220 errorQueue = errorQueue->next;
221
222 // Create wrapper class and copy cmd_error
223 CommandError e(ptr, COMMAND_ERROR_TEMPORARY);
224
225 // Destroy old cmd_error from queue
226 cmd_error_destroy(ptr);
227
228 return e;
229}
230
231void SimpleCLI::addCmd(Command& c) {
232 if (!cmdList) {

Callers

nothing calls this directly

Calls 2

CommandErrorClass · 0.85
cmd_error_destroyFunction · 0.85

Tested by

no test coverage detected