1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Remove custom base Exception class

This commit is contained in:
Ted John
2018-01-02 19:23:22 +00:00
parent 61dfb3dac7
commit 02c58a6c5a
41 changed files with 143 additions and 198 deletions

View File

@@ -93,7 +93,7 @@ namespace ObjectFactory
// TODO check that ex is really EOF and not some other error
context->LogError(OBJECT_ERROR_UNEXPECTED_EOF, "Unexpectedly reached end of file.");
}
catch (const Exception &)
catch (const std::exception &)
{
context->LogError(OBJECT_ERROR_UNKNOWN, nullptr);
}
@@ -124,10 +124,10 @@ namespace ObjectFactory
ReadObjectLegacy(result, &readContext, &chunkStream);
if (readContext.WasError())
{
throw Exception("Object has errors");
throw std::runtime_error("Object has errors");
}
}
catch (Exception)
catch (const std::exception &)
{
Console::Error::WriteLine("Unable to open or read '%s'", path);
@@ -200,7 +200,7 @@ namespace ObjectFactory
result = new StexObject(entry);
break;
default:
throw Exception("Invalid object type");
throw std::runtime_error("Invalid object type");
}
return result;
}