3 ms·
exceptions usually happen because of one of two reasons: 1) bugs 2) system failures. bugs you can't recover from, you need to fix them. system failures can s
by pswenson 14y ago
exceptions usually happen because of one of two reasons: 1) bugs 2) system failures.
bugs you can't recover from, you need to fix them.
system failures can sometimes be recovered from, but often they need manual intervention. usually it's best to just report them and let someone fix the problem rather than spending a bunch of resources trying to code some way around the problem (which introduces more bugs).
there are situations where it might be appropriate to try to recover. If an HTTP call fails, no reason not to retry a few times. But if your DB is down - sorry you are F'ed. Alert it - make it visible.