mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
- This is a (weak/overridable) function meant to be called when the program encounters an unrecoverable error, but it's not fatal enough to bring down the entire system with it. - The default implementation uses svcBreak, passing the result code in the user buffer. - Replaced all usages of fatalThrow with diagAbortWithResult throughout the entire library.
9 lines
206 B
C
9 lines
206 B
C
#include "kernel/svc.h"
|
|
#include "runtime/diag.h"
|
|
|
|
__attribute__((weak)) void diagAbortWithResult(Result res)
|
|
{
|
|
svcBreak(BreakReason_Panic, (uintptr_t)&res, sizeof(res));
|
|
__builtin_unreachable();
|
|
}
|