| 143 | } |
| 144 | |
| 145 | void JUTException::panic_f_va(const char *file, int line, const char *fmt, va_list vl) |
| 146 | { |
| 147 | char buf[256]; |
| 148 | int n = vsnprintf(buf, sizeof(buf) - 1, fmt, vl); |
| 149 | if(sErrorManager == nullptr) { |
| 150 | OSPanic(file, line, buf); |
| 151 | } |
| 152 | static OSContext context; |
| 153 | memcpy(&context, OSGetCurrentContext(), sizeof(OSContext)); |
| 154 | sErrorManager->mStackPointer = OSGetStackPointer(); |
| 155 | exCallbackObject.callback = sPreUserCallback; |
| 156 | exCallbackObject.error = 0xff; |
| 157 | exCallbackObject.context = &context; |
| 158 | exCallbackObject.dsisr = 0; |
| 159 | exCallbackObject.dar = 0; |
| 160 | |
| 161 | if (sConsole == nullptr || sConsole && FLAG_ON(sConsole->getOutput(), JUTConsole::OUTPUT_CONSOLE)) |
| 162 | { |
| 163 | OSReport("%s in \"%s\" on line %d\n", buf, file, line); |
| 164 | } |
| 165 | |
| 166 | if(sConsole) |
| 167 | sConsole->print_f("%s in \"%s\" on line %d\n", buf, file, line); |
| 168 | |
| 169 | OSSendMessage(&sMessageQueue, &exCallbackObject, OS_MESSAGE_BLOCK); |
| 170 | OSSuspendThread(OSGetCurrentThread()); |
| 171 | } |
| 172 | |
| 173 | void JUTException::panic_f(const char *file, int line, const char *fmt, ...) { |
| 174 | va_list vl; |
nothing calls this directly
no test coverage detected