The console error_code and error_condition keep the value in the second
dword: the shared error_category::equivalent reads it at +4, the
default_error_condition overrides return it shifted into the high half,
and title code built against the SDK headers stores 0 at +0 and reads
value() at +4. The generic category returned and compared the value at
+0.
system_category returns a static _System_error_category named "system"
that shares the generic message table and maps a value with a message
to the generic category in default_error_condition. The equivalent
overloads are shared by both categories and go through the object's own
default_error_condition, as the console's base implementation does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
Throw a guest std::system_error for the Dinkumware _Cpp_error codes,
as in VC12 and microsoft/STL thread0.cpp: the error_code holds the
FreeBSD errno and a guest generic error category modelled in libc, and
what() is the table message followed by the category message. Codes
outside the table throw std::out_of_range. The system_error copy
constructor and assignment now copy the error_code too.
Imported by Deathloop (PPSA01670) and Minecraft Legends (PPSA05510).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
(cherry picked from commit bed1deafdee4b50bea9683a1cead0d0320150eb7)