【发布时间】:2012-10-18 13:37:37
【问题描述】:
【问题讨论】:
-
你没有看 Apple 文档吗?
-
不会除以零引发信号
SIGFPE,而不是异常?
标签: ios ios4 xcode4 objective-c-blocks
【问题讨论】:
SIGFPE,而不是异常?
标签: ios ios4 xcode4 objective-c-blocks
@try {
...
}
@catch (CustomException *ce) { // 1
...
}
@catch (NSException *ne) { // 2
// Perform processing necessary at this level.
...
}
@catch (id ue) {
...
}
@finally { // 3
// Perform processing necessary whether an exception occurred or not.
...
}
【讨论】:
Try/catch 似乎在 Objective-c 中不受欢迎。通常一个 NSError 参数是通过引用传递的。示例代码见this tutorial。
【讨论】: