Is there a way to execute some code on runtime warnings like "SWIFT TASK CONTINUATION MISUSE"? I want to log those errors to remote logging service.
It seems it should be, because I recently came across a crash with the following value of the crash_info_entry_0 key in Crashlytics:
SWIFT TASK CONTINUATION MISUSE: requestAuthorization() leaked its continuation!
MyApp/Tracker.ViewModel.swift:30: Fatal error: Unexpectedly found nil while unwrapping an Optional value
The second line is the source of the crash, but the first one is clearly a runtime warning appeared shortly before it. How can I log those warnings?