Introduction
Error handling helps your program deal with problems without crashing. It makes your program safer and easier to fix.
When reading a file that might not exist
When dividing numbers and the divisor could be zero
When asking the user for input that might be wrong
When connecting to a network that might fail
When allocating memory that might not be available