From other questions, I can see that it is recommended that NSError
be used for recoverable errors, and @throw
/@catch
/@finally
and NSException
should be used for fatal errors.
This makes no sense to me. Why would you use NSException
for fatal errors? The whole point is that they can be caught! If catching them isn't the point, why have the @try
/@catch
system at all? Why not just NSLog
, exit(1)
, and call it a day?
NSError
is also really clunky, which drives me to prefer @throw
/@catch
/@finally
What motivates the use of one over the other?