---

Python Exception Handling

Python will let you know when you get your syntax wrong. It’ll immediately fail and not allow your program to run. What about when your code has a different type of problem? Those are called exceptions, and they tend to be harder to catch. It’s up to you to recognize situations where hey might come up and catch them to prevent your program from crashing altogether.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis