Yes, but that is just the default behavior, does this not work?
NSSetUncaughtExceptionHandler({exception in
print("\(exception)")
exit(1)
});