3 ms·
In C/C++ land, errors are often mapped to const size_t int values. Whether it's an enum or just a list of "codes". In this case, I suspect (like OpenGL) it's ju
by reactordev 3y ago
In C/C++ land, errors are often mapped to const size_t int values. Whether it's an enum or just a list of "codes". In this case, I suspect (like OpenGL) it's just a giant list of codes defined as "extern const uint32_t MY_SUPER_ERROR = 0x0001" and some other part of the code has defined the same value to another error type. Then it's trying to value match and give a human readable value (0x001) but based on the matched value (0x0001 becomes 0x1000) because MY_SUPER_ERROR is 0x1000 in some other part of the code. This happens when people in C/C++ land follow this logic:
Lib Guy 1: "I need an error.h to store all my errors to make it easy for me"
Lib Gal 2: "I need an error.h to store all of my error values so I can just use type names like a boss"
Exe Guru 1: "Which <error.h> is this?"
The other option is that an error was thrown inside error handling code which threw an error and was unhandled, throwing an error generically at the base.
- mook 3y ago0x80070643 is ERROR_INSTALL_FAILURE, so yeah basically somebody clobbered the error code in some installation routine. It's in winerror.h, according to https://learn.microsoft.com/en-us/windows/win32/debug/system-error-code-lookup-tool https://learn.microsoft.com/en-us/windows/win32/debug/system...
- reactordev 3y ago“What’s a null?” “Well, it’s the absence of a value, or 0, or nullptr, or…” “Forget it, you’re insane.” - My son.