This is backwards. You shouldn’t recover from a panic. The whole point is, it’s exceptional—you cannot recover. If your app cannot run without that file, that you expect to be there (because it’s checked into source control), then of course crashing is 100% what must happen. You have no other option.

Now, with a server, each request is effectively a new run. It’s possible other requests will work just fine, because they won’t need that file. Which is why it’s reasonable to wrap everything in a recover within main(). You could use Rollbar’s wrapAndWait() for instance.

Advocate of Score Voting and Approval Voting. Software engineer. Father. Husband. American.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store