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 sLength = match[1];
std::string name = match[2]; std::string name = match[2];
unsigned long length = 0; unsigned long length = std::stoul(sLength);
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) {
if (name.length() == length) { if (name.length() == length) {
className = name; className = name;
} }
} }
} }
}
//.?AVPolygon@@ //.?AVPolygon@@
//.?AVtype_info@@ //.?AVtype_info@@
else if (compiler == "ms") { else if (compiler == "ms") {

View File

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