libui/darwin/debug.m

20 lines
591 B
Mathematica
Raw Normal View History

// 13 may 2016
#import "uipriv_darwin.h"
// LONGTERM don't halt on release builds
void realbug(const char *file, const char *line, const char *func, const char *prefix, const char *format, va_list ap)
{
NSMutableString *str;
NSString *formatted;
str = [NSMutableString new];
2016-05-13 20:00:12 -05:00
[str appendString:[NSString stringWithFormat:@"[libui] %s:%s:%s() %s", file, line, func, prefix]];
formatted = [[NSString alloc] initWithFormat:[NSString stringWithUTF8String:format] arguments:ap];
[str appendString:formatted];
[formatted release];
NSLog(@"%@", str);
[str release];
__builtin_trap();
}