#100DaysOfCode in Python Transcripts
Chapter: Days 25-27: Error handling
Lecture: Your turn: Day 3

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Day 3, it's time to take those
0:02 errors that you've discovered
0:03 and put in specific error handling for each one of them.
0:07 So here I've written out a little try-except block
0:10 that shows the standard error handling
0:12 in Python, you can use this as a template,
0:14 take the various types of errors you found on Day 2,
0:17 figure out how you might either deal with them or at least
0:19 let the user know, keep your application running.
0:23 Add the error handling to your code,
0:25 make sure that it actually does handle the errors,
0:27 you know, get the thing to fail in whatever ways
0:30 you were doing before to find the errors,
0:31 but now you should have some kind of nice response
0:35 that's not a full-on crash,
0:36 maybe it even keeps running
0:37 and just asks the question again, something like that.
0:40 Now that you know how to do error handling,
0:42 you have some practice with it,
0:43 when you're writing your applications,
0:45 be sure to think of the errors that can happen,
0:47 put the error handling in place, and fail gracefully.