catch
Also written: catch block, try/catch, try
A `try` block holds risky code, and a `catch` block says what to do if a given exception is thrown inside it. This lets a bad input like `ten` print a friendly message instead of crashing the program.
Also written: catch block, try/catch, try
A `try` block holds risky code, and a `catch` block says what to do if a given exception is thrown inside it. This lets a bad input like `ten` print a friendly message instead of crashing the program.