最好的方法是将异常分配给一个可以从块的其余部分访问的变量。
NSException *ex;
@try {
@try {
[someObject methodWhichCouldThrowException];
} @catch (NSException *e) {
ex = e;
} @finally {
[anotherObject methodWhichCouldThrowADifferentException];
}
} @catch (NSException *e) {
// From here you can access both the exception thrown by 'someObject'
// as well as the exception thrown by 'anotherObject'.
}