sometimes your code detects an error in the application when this happensyou need to raise or throw an exception you see both terms used for the same thingwhich simply means that your code encountered an error it couldn' handleso it passed the error information onto another piece of code to handle (interpretprocessandwith luckfix the exceptionin some casesyou use custom error message objects to pass on the information even though python has wealth of generic message objects that cover most situationssome situations are special for exampleyou might want to provide special support for database applicationand python won' normally cover that contingency with generic message object it' important to know when to handle exceptions locallywhen to send them to the code that called your codeand when to create special exceptions so that every part of the application knows how to handle the exception -all topics covered by this there are also times when you must ensure that your application handles an exception gracefullyeven if that means shutting the application down fortunatelypython provides the finally clausewhich always executeseven when an exception occurs you can place code to close files or perform other essential tasks in the code block associated with this clause even though you won' perform this task all the timeit' the last topic discussed in the knowing why python doesn' understand you developers often get frustrated with programming languages and omputers because they seemingly go out of their way to cause communication problems of courseprogramming languages and computers are both inanimate -there is no desire for anything on the part of either programming languages and computers also don' thinkthey accept whatever the developer has to say quite literally therein lies the problem neither python nor the computer will "know what you meanwhen you type instructions as code both follow whatever instructions you provide to the letter and literally as you provide them you may not have meant to tell python to delete data file unless some absurd condition occurred howeverif you don' make the conditions clearpython will delete the file whether the condition exists or not when an error of this sort happenspeople commonly say that the application has bug in it bugs are simply coding errors that you can remove using debugger ( debugger is special kind of tool that lets you stop or pause application executionexamine the content of variablesand generally dissect the application to see what makes it tick