WEBVTT 00:00.820 --> 00:04.240 Come back guys in this lecture let us talk about exception. 00:04.510 --> 00:08.860 Exception is a runtime error so which can be handled by the program. 00:09.040 --> 00:14.840 So with that previous example where we were getting a runtime error that is in our function. 00:14.980 --> 00:21.560 So we are trying to concatenate a string and an integer so that can be controlled and handled by a program 00:21.570 --> 00:28.830 of either keeping logic on import or adding some restriction by forming this function so we can handle 00:28.930 --> 00:30.120 as a programmer. 00:30.220 --> 00:35.620 So that means if a programmer can get an error in the program he can do something to eliminate that 00:35.620 --> 00:41.540 error or any harm that can cause bad and then discard an exception. 00:41.560 --> 00:47.740 So if you look at the point of view from a tool people post if the programmer can do anything in case 00:47.740 --> 00:51.670 of an error then it discard an error and not exception. 00:51.790 --> 00:57.400 But if a programmer can do something if a programmer can try to solve something or for a programmer 00:57.400 --> 01:04.360 can write a precondition then it is called an exception all the exception are presented as class in 01:04.360 --> 01:10.330 Python so there are exceptions which are only available in Python on class building exception. 01:10.330 --> 01:17.320 The base class for all the built in Exception is this exception class from base exception class the 01:17.320 --> 01:23.680 subclasses scoreless exception and from that there are different subclasses called standard exception 01:23.680 --> 01:24.570 and warning. 01:24.730 --> 01:30.880 So that means there is a base class for exception and then there is a subclass and then there are some 01:30.880 --> 01:33.890 standard errors and then there are some warning. 01:34.120 --> 01:39.360 So as you know there are hundreds and thousands of programmer which are already doing some errors. 01:39.430 --> 01:45.310 So these errors are already standard to the community so that is why there are already classes to solve 01:45.310 --> 01:45.970 them. 01:45.970 --> 01:51.510 We just need to use that particular class to handle that error like a concatenation one. 01:51.520 --> 01:57.360 So this is a common error and it can happen with any programmer and we just need to select the part 01:57.690 --> 02:01.560 of a class toward this type of error and we will be doing that. 02:01.580 --> 02:08.190 And as the Let us know if we move forward just like we were talking about built in functions then user 02:08.190 --> 02:09.220 defined bombshell. 02:09.340 --> 02:15.490 There are also user defined exception maybe most of the common exception are already under our standard 02:15.510 --> 02:21.520 error but there can be some different problem or there can be some different errors or exception which 02:21.520 --> 02:22.550 you might face. 02:22.720 --> 02:29.290 And all these errors and exception will be under User Defined exception and we can write our own exception. 02:29.290 --> 02:37.180 That means we can write our own condition to soil them or due to an error not in the particular program 02:37.180 --> 02:37.630 you see. 02:37.630 --> 02:40.560 This type error is not our standard error. 02:40.660 --> 02:46.740 That means this is only our defined error and we can use our predefined condition to solve them. 02:47.110 --> 02:53.230 So in the next lecture when we're talking about exceptional handling for the purpose of handling errors 02:53.320 --> 02:55.400 in the program should be strong. 02:55.420 --> 03:00.760 That means if you're working on a software if you're working on other portal you cannot stop in the 03:00.760 --> 03:05.630 middle of your execution and through this type of error to any user on your claim. 03:05.890 --> 03:08.950 So you should be prepared for this type of error. 03:08.950 --> 03:14.970 The basic example of exception handling is when we visit any page of our website which is not available 03:15.280 --> 03:17.800 so we get for not all that is 3:56. 03:17.800 --> 03:19.220 Page Not Found it. 03:19.360 --> 03:24.690 So that means there was a certain condition that was already given to St owner. 03:24.910 --> 03:25.970 In this case. 03:26.260 --> 03:28.710 Then throw a file not there. 03:28.750 --> 03:35.910 There is a 500 error that does so what the leaders so there is any problem with a word then to set up. 03:36.070 --> 03:42.610 So we have to define certain for certain exception with that condition and as a programmer Your code 03:42.610 --> 03:43.480 should be strong. 03:43.480 --> 03:45.730 That means your code should be robust. 03:45.890 --> 03:50.400 So in the next election let us talk about exceptional handling and which we'll be covering. 03:50.460 --> 03:55.360 Try XM finally else and not wanting to see you in the next one.