Hello, in this video, I am going to show you how to trigger an error. So this would trigger an error, you know, because the problem would be if you essentially want to trigger an error manually. So that might not be a problem that would generally, you know, trigger the error. But you know, maybe the user input some data, let's do something like that I'm not gonna do it, like any sort of input, who's gonna have dollar or equals 10, or maybe 10s, invalid, and put 11, maybe type a zero to 10. So let's say if I put $1, I am greater than 10, then we're going to basically trigger an error trigger the error and we just do throw new exception. And we just say whatever the error is, number if we reload that, we get uncaught exception number two large.
So as you can see, we have, you know, thrown an error thrown an exception. And if we want to actually override the exception, so it actually has a custom method instead of error handler, you want to do exception. So set exception handler, and we'll rename this to exception should just be dollar section a bit more basic. And we can do it from here. connection and get an individual Return. So what we can do get the message through a bunch of other stuff and I recommend having a look at what else you can do as well.
There you go number two large, or I'm also going to do is append a string or say an exception. And they are number two large. So that is how you trigger an error and exception manually. So that's it. If you have any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.