We do these things not because they are easy, but because we thought they were going to be easy. @Maciej Cegłowski
Many new programmers write code and then only test the happy path: only the cases where there are no errors. But you should also be planning for and testing your sad paths, where things can and will go wrong. @learncpp