Is it possible to catch a NSInternalInconsistencyException in Swift?
exception, swift
Solution
It can be done for example with https://github.com/williamFalcon/SwiftTryCatch. First add it to your Podfile:
use_frameworks!
pod 'SwiftTryCatch'
Then in your code `import SwiftTryCatch` and then you can catch Objective-C exceptions like this
SwiftTryCatch.try({
// try block
}, catch: { (error) in
// catch block
}, finally: {
// finally block
})
Problem
Is it possible to catch a NSInternalInconsistencyException in Swift ? If it is, how could that be done?