Created
June 19, 2015 19:09
-
-
Save itod/bbc9c2ee250084e3b639 to your computer and use it in GitHub Desktop.
Try/Finally with no exceptions in sight.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// Finally | |
// | |
// Created by Todd Ditchendorf on 6/19/15. | |
// Copyright (c) 2015 Todd Ditchendorf. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
@try { | |
return 0; | |
} | |
@finally { | |
NSLog(@"OHAI"); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Or, to be a bit more clear about the kinds of things that could happen depending on runtime values: