Given the following situation:
@try {
@try {
[receiver raisingFirstException];
} @finally {
[otherReceiver raisingFinalException];
}
} @catch (id e) {
printf("exception: %s\n", [[e stringValue] cString]);
}
Is there a way to get the first exception to
@finallyblock or to get both exceptions in a block @catch?
I have some code where a block @finallyperforms some checks that may throw an exception, but I don't want to lose the original exception (the main reason).
If the original exception was not, but the checks are not performed, I want the exception that they throw.
source
share