1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

Close #12429: Refactor OBJECT_ERROR to use strong enum and typo fix in build.sh (#13145)

* Close #12429: Refactor OBJECT_ERROR to use strong enum

* Typo Fix in build.sh: Unknown
This commit is contained in:
Julia Pinheiro
2020-10-10 12:21:07 -03:00
committed by GitHub
parent f28907a87d
commit b628bba704
12 changed files with 40 additions and 40 deletions

View File

@@ -137,7 +137,7 @@ public:
return {};
}
void LogWarning(uint32_t code, const utf8* text) override
void LogWarning(ObjectError code, const utf8* text) override
{
_wasWarning = true;
@@ -147,7 +147,7 @@ public:
}
}
void LogError(uint32_t code, const utf8* text) override
void LogError(ObjectError code, const utf8* text) override
{
_wasError = true;
@@ -192,11 +192,11 @@ namespace ObjectFactory
catch (const IOException&)
{
// TODO check that ex is really EOF and not some other error
context->LogError(OBJECT_ERROR_UNEXPECTED_EOF, "Unexpectedly reached end of file.");
context->LogError(ObjectError::UnexpectedEOF, "Unexpectedly reached end of file.");
}
catch (const std::exception&)
{
context->LogError(OBJECT_ERROR_UNKNOWN, nullptr);
context->LogError(ObjectError::Unknown, nullptr);
}
}