Add EnvironmentLoader to every OSFatal

This commit is contained in:
Maschell 2023-06-16 17:17:33 +02:00
parent 5da6afb310
commit 5e4f93ddfa
4 changed files with 6 additions and 6 deletions

View File

@ -272,7 +272,7 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
auto *screenBuffer = (uint8_t *) memalign(0x100, tvBufferSize + drcBufferSize); auto *screenBuffer = (uint8_t *) memalign(0x100, tvBufferSize + drcBufferSize);
if (!screenBuffer) { if (!screenBuffer) {
OSFatal("Fail to allocate screenBuffer"); OSFatal("EnvironmentLoader: Fail to allocate screenBuffer");
} }
memset(screenBuffer, 0, tvBufferSize + drcBufferSize); memset(screenBuffer, 0, tvBufferSize + drcBufferSize);
@ -285,7 +285,7 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
DrawUtils::initBuffers(screenBuffer, tvBufferSize, screenBuffer + tvBufferSize, drcBufferSize); DrawUtils::initBuffers(screenBuffer, tvBufferSize, screenBuffer + tvBufferSize, drcBufferSize);
if (!DrawUtils::initFont()) { if (!DrawUtils::initFont()) {
OSFatal("Failed to init font"); OSFatal("EnvironmentLoader: Failed to init font");
} }
uint32_t selected = autobootIndex > 0 ? autobootIndex : 0; uint32_t selected = autobootIndex > 0 ? autobootIndex : 0;

View File

@ -39,7 +39,7 @@ public:
[[nodiscard]] const char *getRPLName() const { [[nodiscard]] const char *getRPLName() const {
if (name.max_size() < strlen("._import_") + 1) { if (name.max_size() < strlen("._import_") + 1) {
OSFatal("Invalid RPLName, is too short to be valid"); OSFatal("EnvironmentLoader: Invalid RPLName, is too short to be valid");
} }
return name.c_str() + strlen("._import_"); return name.c_str() + strlen("._import_");
} }

View File

@ -232,7 +232,7 @@ bool ModuleDataFactory::getImportRelocationData(std::unique_ptr<ModuleData> &mod
uint32_t section_index = psec->get_info(); uint32_t section_index = psec->get_info();
if (!infoMap.contains(sym_section_index)) { if (!infoMap.contains(sym_section_index)) {
DEBUG_FUNCTION_LINE_ERR("Relocation is referencing a unknown section. %d destination: %08X sym_name %s", section_index, destinations[section_index], sym_name.c_str()); DEBUG_FUNCTION_LINE_ERR("Relocation is referencing a unknown section. %d destination: %08X sym_name %s", section_index, destinations[section_index], sym_name.c_str());
OSFatal("Relocation is referencing a unknown section."); OSFatal("EnvironmentLoader: Relocation is referencing a unknown section.");
} }
auto relocationData = make_unique_nothrow<RelocationData>(type, auto relocationData = make_unique_nothrow<RelocationData>(type,

View File

@ -105,7 +105,7 @@ PairMenu::PairMenu() {
mIMHandle = IM_Open(); mIMHandle = IM_Open();
if (mIMHandle < 0) { if (mIMHandle < 0) {
DEBUG_FUNCTION_LINE_ERR("PairMenu: IM_Open failed"); DEBUG_FUNCTION_LINE_ERR("PairMenu: IM_Open failed");
OSFatal("PairMenu: IM_Open failed"); OSFatal("EnvironmentLoader: PairMenu: IM_Open failed");
} }
mIMRequest = (IMRequest *) memalign(0x40, sizeof(IMRequest)); mIMRequest = (IMRequest *) memalign(0x40, sizeof(IMRequest));
@ -114,7 +114,7 @@ PairMenu::PairMenu() {
if (!mIMRequest || !mIMCancelRequest) { if (!mIMRequest || !mIMCancelRequest) {
DEBUG_FUNCTION_LINE_ERR("Failed to allocate im request"); DEBUG_FUNCTION_LINE_ERR("Failed to allocate im request");
OSFatal("PairMenu: Failed to allocate im request"); OSFatal("EnvironmentLoader: PairMenu: Failed to allocate im request");
} }
mIMEventMask = IM_EVENT_SYNC; mIMEventMask = IM_EVENT_SYNC;