summaryrefslogtreecommitdiff
path: root/soh/src/boot/assert.c
blob: f84f4d46f20381ba7278f758990ce3ffaa66fbe5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "global.h"

#ifndef __SWITCH__
#ifdef __WIIU__
void _assert(const char* exp, const char* file, s32 line) {
#else
void __assert(const char* exp, const char* file, s32 line) {
#endif
    char msg[256];

    osSyncPrintf("Assertion failed: %s, file %s, line %d, thread %d\n", exp, file, line, osGetThreadId(NULL));
    sprintf(msg, "ASSERT: %s:%d(%d)", file, line, osGetThreadId(NULL));
    Fault_AddHungupAndCrashImpl(msg, exp);
}
#endif