Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Checked Exceptions in objc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checked Exceptions in objc



On May 14, 2007, at 11:56 PM, Philip Q wrote:

My suggestion would to be not to try and make ObjC fit the practices
of another language, it has its own practices and style that you'll be
far more productive with if you adopt rather than fight.

Also, you can write unit tests that demonstrate your code throws the appropriate exceptions in the exceptional circumstances in which they should be thrown.


Since you have specific NSException subclasses, you can use the STAssertThrowsSpecificmacro for this. You could also use STAssertThrowsSpecificNamed if you're using NSException itself or a single subclass, and distinguishing exceptions by their name.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Objc-language mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Checked Exceptions in objc (From: Mike Manzano <email@hidden>)
 >Re: Checked Exceptions in objc (From: Jonathan deWerd <email@hidden>)
 >Re: Checked Exceptions in objc (From: Mike Manzano <email@hidden>)
 >Re: Checked Exceptions in objc (From: "Philip Q" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.