mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
The libc.prx bundled with PPSA02530 keeps error_code values in the second dword: the shared error_category::default_error_condition shifts the value into the high half and the equivalent overloads compare that dword and the category. Export the type info, the base destructor and the three base members, so titles that import them resolve to the same code the generic and system category vtables already use. future_category returns a static _Future_error_category derived from _Generic_error_category and named "future". Its message maps 1..4 to "broken promise", "future already retrieved", "promise already satisfied" and "no state", and falls back to the generic table. future_error is 0x40 bytes: a GuestLocale::String at 0x8 and the 16-byte error_code at 0x30; its 0x30-byte vtable carries the console's _Doraise slot. _Throw_future_error allocates that size and throws it with the console type info, and _Rethrow_future_exception delegates to rethrow_exception.