To log any message on file I am using writeData
method of NSFileHandle
. Sometimes this method throws an exception but I can not handle it because code is written in swift.
Is there any work around ?
I have tried this :
I have tried this : NS_INLINE NSException * _Nullable tryBlock(void(^_Nonnull tryBlock)(void)) {
@try {
tryBlock();
}
@catch (NSException *exception) {
return exception;
}
return nil;