Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. // COMPILING
  2.  
  3. 13 [[nodiscard]] std::string message(int ev) const override {
  4. 14 switch (static_cast<ErrorCode>(ev)) {
  5. 15 case ErrorCode::NOT_RUNNING: {
  6. 16 return "The service is not running.";
  7. 17 }
  8. 18 case ErrorCode::CANNOT_START_SERVICE: {
  9. 19 return "Cannot start web service, unable to connect to server.";
  10. 20 }
  11. 21 case ErrorCode::CANNOT_STOP_SERVICE: {
  12. 22 return "Cannot stop web service.";
  13. 23 }
  14. 24 case ErrorCode::USER_NOT_FOUND:
  15. 25 return "No user was found.";
  16. 26 }
  17. 27 return ERROR_UNRECOGNISED_MSG;
  18. 28 }
  19.  
  20.  
  21.  
  22. // AFTER CHANGE - NOT COMPILING
  23.  
  24. 13 [[nodiscard]] std::string message(int ev) const override {
  25. 14 switch (static_cast<ErrorCode>(ev)) {
  26. 15 case ErrorCode::NOT_RUNNING: {
  27. 16 return "The service is not running.";
  28. 17 }
  29. 18 case ErrorCode::CANNOT_START_SERVICE: {
  30. 19 return "Cannot start web service, unable to connect to server.";
  31. 20 }
  32. 21 case ErrorCode::CANNOT_STOP_SERVICE: {
  33. 22 return "Cannot stop web service.";
  34. 23 }
  35. 24 case ErrorCode::USER_NOT_FOUND:
  36. 25 return "No user was found.";
  37. 26 }
  38. 27 case ErrorCode::MACHINE_SETTING_UPDATE_ERROR:
  39. 28 return "No user was found.";
  40. 29 }
  41. 30 return ERROR_UNRECOGNISED_MSG;
  42. 31 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement