Technical Q&A QA1288

Suppressing the "unexpectedly quit" alert

Q:  How can I suppress the "The application <application> has unexpectedly quit" alert?

A: How can I suppress the "The application <application> has unexpectedly quit" alert?

You can suppress this alert by modifying CrashReporter's modes of operation. CrashReporter has three modes of operation: Basic, Developer, and Server. See CrashReporter for a description of these modes. Use the CrashReporterPrefs or Terminal application to change these modes of operation.

Use the CFPreferencesSetAppValue function to programmatically modify CrashReporter's modes of operation. See Listing 1 for an example of programmatically suppressing the "The application <application> has unexpectedly quit" alert; this example sets DialogType to Developer.

Listing 1  Programmatically suppressing the alert dialog.

CFStringRef key = CFSTR("DialogType"); CFStringRef value = CFSTR("Developer"); CFStringRef appID = CFSTR("com.apple.CrashReporter");  CFPreferencesSetAppValue(key, value, appID);

Further Reading



Document Revision History


DateNotes
2008-03-11

Updated content for Mac OS X 10.4 and 10.5. Fixed a typographical error. "~Library/Preferences/com.apple.CrashReporter.plist" should be "~/Library/Preferences/com.apple.CrashReporter.plist."

2003-10-10

New document that describes how to suppress the "unexpectedly quit" alert.