Created
February 10, 2019 17:11
-
-
Save quentinfasquel/0e5609e903a0abf6a6a8c1b3e0fbec76 to your computer and use it in GitHub Desktop.
This file contains 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
#import "objc_tryCatch.h" | |
NSException * _Nullable objc_tryCatch(void (^ _Nonnull block)(void)) { | |
@try { | |
block(); | |
return nil; | |
} @catch (NSException *exception) { | |
return exception; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment