When an app suddenly quits and returns back to your home screen, can this always be dealt with alternatively with a try, catch block, or are there exceptions (other than memory leaks, too much memory) that can never be tried and catch, and result in the app quitting?
Share
Many errors cannot be caught with try/catch. In most cases, you should not even attempt to. If you’re throwing exceptions or causing a SEGV, then that indicates a serious problem that likely cannot be effectively recovered from. The correct behavior in a mobile environment is to terminate the app. Using tools like TestFlight you can try to recover the logs and stack so that you can resolve the bug.
The way to avoid crashing is careful coding and testing. You should not try to avoid it with a try block.