#import <Foundation/NSString.h>
#import <AppKit/NSAlert.h>
#include "cocoaerrordialog.h"

void run_alert(const char *type, const char *what)
{
	NSString *message = [[[NSString stringWithUTF8String:type] stringByAppendingString:@": "]
		stringByAppendingString:[NSString stringWithUTF8String:what]];
	NSAlert *alert = [NSAlert alertWithMessageText:@"Uncaught exception"
		defaultButton:nil alternateButton:nil otherButton:nil
		informativeTextWithFormat:@"%@", message];
	[alert runModal];
}
