3rdparty: Remove exception usage

This commit is contained in:
Stenzek 2023-06-29 00:03:28 +10:00 committed by Connor McLaughlin
parent adca796d94
commit 1dbccb5e3d
2 changed files with 5 additions and 19 deletions

View File

@ -4764,26 +4764,12 @@ void cGram::demangleClassName(const std::string& input, cName* retvalue, cGram::
std::string sLength = match[1];
std::string name = match[2];
unsigned long length = 0;
bool ok = true;
try {
length = std::stoul(sLength);
}
catch (const std::invalid_argument&) {
ok = false;
}
catch (const std::out_of_range&) {
ok = false;
}
if (ok) {
unsigned long length = std::stoul(sLength);
if (name.length() == length) {
className = name;
}
}
}
}
//.?AVPolygon@@
//.?AVtype_info@@
else if (compiler == "ms") {

View File

@ -989,11 +989,11 @@ void RA_Shutdown()
// Call shutdown on toolchain
if (_RA_Shutdown != nullptr)
{
#ifdef __cplusplus
#if defined(__cplusplus) && _HAS_EXCEPTIONS
try {
#endif
_RA_Shutdown();
#ifdef __cplusplus
#if defined(__cplusplus) && _HAS_EXCEPTIONS
}
catch (std::runtime_error&) {
}