Given the following situation:
@try {
@try {
// raises an exception :)
[receiver raisingFirstException];
} @finally {
// raises another exception :)
[otherReceiver raisingFinalException];
}
} @catch (id e) {
printf("exception: %s\n", [[e stringValue] cString]);
}
Is there any way to either get the first exception within the
@finally
block or to get both exceptions within the @catch
block?
I have code where the @finally
block does some checks which may raise an
exception but I don't want to loose the original exception (the root cause).
If there was no original exception but the checks fail I want the exception they throw.