Uncaught Error/Exception Handling in Swift

This is the code I use to log all exceptions/errors. Log.error(with:) is a custom function where I store the stack trace, along with other info. Thread.callStackSymbols is an array of strings and represents the stack trace. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool { NSSetUncaughtExceptionHandler { exception in Log.error(with: Thread.callStackSymbols) … Read more