Narek  Simonyan Narek Simonyan - 1 year ago 100
Swift Question

Handle all unhandled exceptions swift

Is there any function like this


void App_UnhandledException(object sender, UnhandledExceptionEventArgs
e)


like in windows phone,for handling all exceptions to send to my server

Answer Source

You can set NSSetUncaughtExceptionHandler in your AppDelegate, refer to this post

But Swift does not fully support it, as explain in this post, you need to do it in Objective-C

EDIT

Thanks for Martin R's comment, Swift now supports it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download