WEBVTT 00:02.550 --> 00:13.830 We can also raise exceptions programmatically like we say X equal to eleven say if X is greater than 00:13.950 --> 00:19.000 ten race x 00:22.950 --> 00:30.840 x is greater than that. 00:31.340 --> 00:34.660 Still there are discovering 00:37.340 --> 00:40.870 this is the exception you have just written The 00:47.980 --> 00:53.310 we can also define our own exception we are called user defined exception 00:56.350 --> 01:00.990 to define our exception. 01:01.030 --> 01:07.540 We need to create a class which is drive from the base class exception 01:11.570 --> 01:12.150 section 01:14.960 --> 01:20.800 child class of the name of the parent class that are 01:23.670 --> 01:28.680 defined in that matter. 01:29.570 --> 01:33.480 Yes sir. 01:35.420 --> 01:35.660 Miss 01:39.320 --> 01:43.460 Right. 01:45.080 --> 01:45.490 That's 01:51.770 --> 01:56.120 and we bring this message. 02:03.090 --> 02:03.750 Right. 02:07.380 --> 02:09.650 Raise or 02:11.900 --> 02:13.330 accept 02:24.540 --> 02:25.220 except 02:40.760 --> 02:45.980 Section B E 02:49.790 --> 02:59.500 print. 02:59.550 --> 03:05.320 So what we have done we have created our class which is derived from exception. 03:05.320 --> 03:16.210 We have created our function and function sorry in a method which is taking one argument as a message 03:17.110 --> 03:20.800 and in our custom method print exception message. 03:20.800 --> 03:22.510 We are just displaying that message. 03:23.600 --> 03:36.310 So when this exception will be raised custom Exception value in response to the message and this e dot 03:36.320 --> 03:40.990 print execute message will print this a statement. 03:41.110 --> 03:41.740 Let's see this 03:51.810 --> 03:55.690 that's how we define custom Exception in that.