 So why do you want to handle some of your error cases? Well, the reality is, sometimes you don't want your program to crash, or you want it to crash with grace. And I use air quotes here because you can't handle whatever the issue is, but you want to at least safely kind of have a parachute that leads you to the ground, so to speak. Here's a great example. If Minecraft is still popular, what happens if you lose a connection while you're trying to play online? Well, in this case, in this earlier version of Minecraft, what they would do is they would actually say, oh, well, you happen to have an error that the connection was lost. At some point, it ran out and it gives a little error message here. And then, specifically, it is still giving you some sort of catch-all of what to do if this crash happens, rather than your program just shutting down completely. Very similar, I happen to use conditional or exception handling inside of typos. Quite a number of places for debugging and for processing. So, for example, you have to do typing exercises as part of this class. Well, I have to evaluate them because it's happening online and you may not finish the entire thing, so to speak. So, if we just kind of walk through this step-by-step, the first thing I am doing is I am processing, first, what was the code for that particular exercise and then what did you type? This is first to allow me to just do some processing. That's where that sanitized code comes into play. That's mostly because Windows and Macs, they handle different things like the inner key differently. So, I have to do a little bit of sanitizing cleanup before I want to compare these two strings. Then, you might notice, again, I have a try statement going on here. Specifically, what I am going to do is I want to grab character by character, whether or not you type the correct word. So, that's exactly what I'm attempting to do here. Grab that character at I and then do the exact same thing for student. You may notice that I actually have multiple try statements. So, as you can probably already guess, yes, you can in fact do multiple tries within each other. But specifically, what happens if just using this as an analogy, you don't type out everything. It's not that you made a typo, you just try to submit early. Well, if my I, say for example, is character 100 and you only had 99 characters in your submission, well, this trying to reference a 100 when no character or there is no element at index 100, that's going to error my program. And so, explicitly, you can see I have an accept block going on here where I say, oh, well, let me catch an exception. Now, just to point out a little bit of the fancier things going on here, you see that there is an as E and as E is just saying very similar to when we were handling files, like with open as Fi, it's giving a variable. So, it's taking that exception and making it a variable. Now, the other little portion here is specifically, you may notice that there's something called raise. Now, what this is doing is instead of me just handling the program, what I'm doing instead is saying, this is the explicit error that I want to happen. Oh, it's an assertion error. And I'm giving some message as well. So in this case, instead of doing just the print statement saying, oh, you know, you can't divide by zero, I'm actually saying, here's the feedback I want from this type of error and just a little more detail. So in this case, where, what, what number was going on here. And so you may notice that if you attempt to go to typos and type only half of the program, when you submit, this is actually the feedback you're going to get verbatim, this is actually the message that I'm telling you you forgot to do. And just to sort of go through there, you can see I have some other ones as well. What happens if you have instead of you didn't crash because you typed in everything but you accidentally had a character that was incorrect. Oh, well, I do the same error but I could have given you different feedback. This is the sort of larger except handling where I take whatever exception that was and I'm just extracting it out. So in this case, I'm grabbing what message what the feedback was and then what the character number was. This is mostly so I know specifically what line, what line to highlight. That's just telling me, you know, what line on typos to highlight for you and then just some little pieces of information that we'll get into a little later that tells me, oh, well, you didn't get any stars because you didn't get it right. Again, here's the column number and the row number. So I can indicate what line of code you are on. Here's the message. And here's just me being able to tell the website. You did not, in fact, solve the typing exercise.