Error.cpp 1.0 KB

1234567891011121314151617181920212223
  1. #include "utils/Error.hpp"
  2. const char* Core::getErrorName(Error e) {
  3. switch(e) {
  4. case Error::NONE: return "NONE";
  5. case Error::NEGATIVE_ARGUMENT: return "NEGATIVE_ARGUMENT";
  6. case Error::CAPACITY_REACHED: return "CAPACITY_REACHED";
  7. case Error::BLOCKED_STDOUT: return "BLOCKED_STDOUT";
  8. case Error::OUT_OF_MEMORY: return "OUT_OF_MEMORY";
  9. case Error::INVALID_CHAR: return "INVALID_CHAR";
  10. case Error::NOT_FOUND: return "NOT_FOUND";
  11. case Error::INVALID_STATE: return "INVALID_STATE";
  12. case Error::INVALID_INDEX: return "INVALID_INDEX";
  13. case Error::INVALID_ARGUMENT: return "INVALID_ARGUMENT";
  14. case Error::TIME_NOT_AVAILABLE: return "TIME_NOT_AVAILABLE";
  15. case Error::SLEEP_INTERRUPTED: return "SLEEP_INTERRUPTED";
  16. case Error::THREAD_ERROR: return "THREAD_ERROR";
  17. case Error::EXISTING_KEY: return "EXISTING_KEY";
  18. case Error::CANNOT_OPEN_FILE: return "CANNOT_OPEN_FILE";
  19. case Error::END_OF_FILE: return "END_OF_FILE";
  20. }
  21. return "?";
  22. }