How to use NSSetUncaughtExceptionHandler to show exception message on UIView in Swift

后端 未结 2 883
天涯浪人
天涯浪人 2021-01-23 11:46

I use Martin R\'s answer to print the NSSetUncaughtExceptionHandler in Swift.

How should I use NSSetUncaughtExceptionHandler in Swift

  func exceptionHan         


        
2条回答
  •  梦毁少年i
    2021-01-23 12:01

    with the use of NSSetUncaughtExceptionHandler

    NSSetUncaughtExceptionHandler { exception in
                print("EXception Details Are \n\nExceptionName--> \(exception.name) \nReason -->\(exception.reason!)\n\(exception.description)")
                print(exception.callStackSymbols)
            }
    

提交回复
热议问题