Home > Net >  Handle "error: Execution was interrupted, reason: signal SIGABRT." exceptions to print the
Handle "error: Execution was interrupted, reason: signal SIGABRT." exceptions to print the

Time:08-26

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)
}
  • Related