1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Fix catching of polymorphic exception

This commit is contained in:
Michał Janiszewski
2018-03-27 20:43:20 +02:00
parent 566af0c4f7
commit c4d5920140

View File

@@ -259,9 +259,9 @@ namespace ObjectFactory
}
json_decref(jRoot);
}
catch (std::runtime_error)
catch (const std::runtime_error &err)
{
Console::Error::WriteLine("Unable to open or read '%s'", path.c_str());
Console::Error::WriteLine("Unable to open or read '%s': %s", path.c_str(), err.what());
delete result;
result = nullptr;