要记录文件中的任何邮件,我使用writeData
NSFileHandle
方法。有时这个方法抛出一个异常,但我无法处理它,因为代码是用swift编写的。
有什么工作吗?
我试过这个:
I have tried this : NS_INLINE NSException * _Nullable tryBlock(void(^_Nonnull tryBlock)(void)) {
@try {
tryBlock();
}
@catch (NSException *exception) {
return exception;
}
return nil;