Kept both sides in StandardExceptions.cpp: main's system_category and error_code value at offset 4 plus this PR's SceV2 types; the shared ThrowCppError and the test's ErrorCode follow the new layout. No exports overlap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The versioned C++ library raises its own exception types:
std::__sce_v2::length_error, out_of_range, invalid_argument, runtime_error,
overflow_error, range_error, system_error, ios_base::failure and the plain
bad_function_call, bad_optional_access, bad_weak_ptr and bad_variant_access.
The message types derive from std::__sce_cxxvers::_Error_exception, which
derives from the shared std::exception. Catch clauses compiled against these
headers name the versioned types, so throwing the unversioned ones (as the
versioned _Xbad_function_call did) never reaches them.
Adds _Error_exception's constructors, destructors, what() and typeinfo; the
versioned _X* throwers, _Throw(const T&) copies and _Throw_Cpp_error; the
versioned _Syserror_map (code 0 is "success", unknown codes are
"unknown error") and _Xtime_get_ticks. _Xbad_alloc throws the shared
std::bad_alloc, as the console does. The unversioned _Throw_Cpp_error body
becomes a helper that takes the exception table.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK