eli5: In programming, how does using “try and except/catch” blocks stop the program from crashing?

1.08K views

eli5: In programming, how does using “try and except/catch” blocks stop the program from crashing?

In: 10

20 Answers

Anonymous 0 Comments

You are baking a cake and measuring all the ingredients. If you are cracking eggs directly over the bowl that already has the other ingredients and one of the eggs is rotten you ruin everything in the bowl. If you crack the eggs into their own small bowl it allows you to find the rotten egg and get rid of just the egg, and try again, if the eggs are all good you add to the large bowl with everything else.

You are viewing 1 out of 20 answers, click here to view all answers.