memex
Loading...
Searching...
No Matches
error.hpp
Go to the documentation of this file.
1#pragma once
2#include <string_view>
3
4namespace memex
5{
24
31 constexpr std::string_view parseError(Error error)
32 {
33 switch (error)
34 {
36 return "Already attached";
38 return "Invalid Process Id";
40 return "Access denied";
42 return "Failed to open process";
44 return "Failed to terminate process";
46 return "Invalid handle";
48 return "Process not found";
50 return "Process32First failed";
52 return "Failed to create Toolhelp snapshot";
54 return "Module32First failed";
56 return "Module not found";
57 default:
58 return "Unknown error";
59 }
60 }
61}
Definition access_mask.hpp:5
Error
An enumeration of error codes that can be returned by the library.
Definition error.hpp:11
constexpr std::string_view parseError(Error error)
Converts an error code to its string representation.
Definition error.hpp:31