How do you handle generic exceptions like the kind in the title in a Swift playground? I would like to set a callback to print the exception out.
CodePudding user response:
Try
NSSetUncaughtExceptionHandler { exception in
print(exception)
}
How do you handle generic exceptions like the kind in the title in a Swift playground? I would like to set a callback to print the exception out.
CodePudding user response:
Try
NSSetUncaughtExceptionHandler { exception in
print(exception)
}