我是iOS编程的新手,现在遇到一个与从C ++类中抛出异常代码相关的问题。
@try {
myCPPClass myObj ; //this throws integer exception codes
}
@catch (...) { //I want to catch the integer value here, how ??
NSLog(@"Exception:") ;
}
@finally {
}
我知道在Objective-C中使用异常捕获方式编码可能不是一个好的实践,我想知道如何为C++类在Objective-C中创建自定义异常类?