MCPcopy Create free account
hub / github.com/doldecomp/mkdd / errorHandler

Method errorHandler

libs/JSystem/JUtility/JUTException.cpp:120–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118}
119
120void JUTException::errorHandler(OSError error, OSContext *context, u32 dsisr, u32 dar)
121{
122 msr = PPCMfmsr();
123 fpscr = context->fpscr;
124 OSFillFPUContext(context);
125 OSSetErrorHandler(error, nullptr);
126 if (error == OS_ERROR_PROTECTION)
127 {
128 OSProtectRange(0, nullptr, 0, 3);
129 OSProtectRange(1, nullptr, 0, 3);
130 OSProtectRange(2, nullptr, 0, 3);
131 OSProtectRange(3, nullptr, 0, 3);
132 }
133
134 exCallbackObject.callback = sPreUserCallback;
135 exCallbackObject.error = error;
136 exCallbackObject.context = context;
137 exCallbackObject.dsisr = dsisr;
138 exCallbackObject.dar = dar;
139
140 OSSendMessage(&sMessageQueue, &exCallbackObject, OS_MESSAGE_BLOCK);
141 OSEnableScheduler();
142 OSYieldThread();
143}
144
145void JUTException::panic_f_va(const char *file, int line, const char *fmt, va_list vl)
146{

Callers

nothing calls this directly

Calls 6

OSFillFPUContextFunction · 0.85
OSSetErrorHandlerFunction · 0.85
OSProtectRangeFunction · 0.85
OSSendMessageFunction · 0.85
OSEnableSchedulerFunction · 0.85
OSYieldThreadFunction · 0.85

Tested by

no test coverage detected