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.