Why is raising an NSException not bringing down my application?

后端 未结 6 712
难免孤独
难免孤独 2020-12-30 08:23

The Problem

I\'m writing a Cocoa application and I want to raise exceptions that will crash the application noisily.

I have the following li

6条回答
  •  情话喂你
    2020-12-30 09:13

    Maybe you can use NSSetUncaughtExceptionHandler, or create a category on NSApplication that overrides -reportException:, as suggested at http://www.cocoadev.com/index.pl?StackTraces

提交回复
热议问题