Re:Isaacs: try/catch is an anti-pattern
by adamjernst on Monday November 14, 2011 @08:59AM
(#3233925)
Isaacs is spot-on, and this is one reason why I love Objective-C. NSException is for programming errors, which should be rare. You can use try/catch, but you almost never do. NSError is for expected application-level errors.
[ Parent
| on HN ]
This is exactly what I came here to say. NSException and NSError combined with the fact that you can send messages to nil objects and just get nil objects back lead to much "cleaner" code in my opinion.