Disable exception handling.

Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
This commit is contained in:
Nekotekina 2020-03-09 19:18:39 +03:00
parent 47bbfdd2aa
commit 04dedb17eb
39 changed files with 421 additions and 437 deletions

View file

@ -710,15 +710,12 @@ void trophy_manager_dialog::StartTrophyLoadThreads()
{
const std::string dir_name = sstr(folder_list.value(i));
gui_log.trace("Loading trophy dir: %s", dir_name);
try
{
LoadTrophyFolderToDB(dir_name);
}
catch (const std::exception& e)
if (!LoadTrophyFolderToDB(dir_name))
{
// TODO: Add error checks & throws to LoadTrophyFolderToDB so that they can be caught here.
// Also add a way of showing the number of corrupted/invalid folders in UI somewhere.
gui_log.error("Exception occurred while parsing folder %s for trophies: %s", dir_name, e.what());
gui_log.error("Error occurred while parsing folder %s for trophies.", dir_name);
}
}));