]> git.tdb.fi Git - libs/gui.git/blob - source/graphics/cocoa/cocoaerrordialog.m
Fix GameController multiple inclusion guards
[libs/gui.git] / source / graphics / cocoa / cocoaerrordialog.m
1 #import <Foundation/NSString.h>
2 #import <AppKit/NSAlert.h>
3 #include "cocoaerrordialog.h"
4
5 void run_alert(const char *type, const char *what)
6 {
7         NSString *message = [[[NSString stringWithUTF8String:type] stringByAppendingString:@": "]
8                 stringByAppendingString:[NSString stringWithUTF8String:what]];
9         NSAlert *alert = [NSAlert alertWithMessageText:@"Uncaught exception"
10                 defaultButton:nil alternateButton:nil otherButton:nil
11                 informativeTextWithFormat:@"%@", message];
12         [alert runModal];
13 }