On Apr 11, 2014, at 4:12 PM, Jens Alfke wrote: > I know the Obj-C religion is that exceptions “normally shouldn’t be caught”, > but this isn’t exactly a normal situation, it’s unit testing.
It's not a religion and it's not "shouldn't", it's "if an exception has crossed through code other than your own, it has probably left it in a corrupt state". In the case of GCD, you almost certainly couldn't proceed even if GCD let you, because GCD's internal data structures would be messed up. Locks would be permanently locked or they may even stop providing any locking behavior while appearing to work (they might report success to multiple threads simultaneously rather than being mutually exclusive). Serial queues would think they're busy when they're not. Or they might run multiple jobs concurrently. Etc. There's no hope of meaningful unit testing continuing on from that point, so termination is about as good as you're going to get. Regards, Ken _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com