Introduction
Throwing errors helps your program stop and tell you when something goes wrong. It makes problems clear so you can fix them.
When a user enters wrong information in a form.
When a file your program needs is missing.
When a calculation gets an unexpected value.
When a function gets bad input it can't handle.