The use of "if not" in the exception handlers is not a good idea as that would mean you will need to add a new check to all your handlers every time you add a new exception handler.
This is good stuff bro, thanks. What if we want to continue processing other code and not return back the exception to the controller just logging it, how do we do that.
Thank you Nitish Kaushik! Your tutorial is very very nice. waiting for your new series...
Very clear. Thanks Nitish
Excellent video - thank you Nitish
Glad you liked it!
The use of "if not" in the exception handlers is not a good idea as that would mean you will need to add a new check to all your handlers every time you add a new exception handler.
how can i get the error message with status code from exception middleware and get it in api controller and send that in response to the user
This is good stuff bro, thanks. What if we want to continue processing other code and not return back the exception to the controller just logging it, how do we do that.
How to close db connections if exception raised in this approach? Generally i can close db connection in finally block...
How can we include it in the DLL's because all the business logics usually we write it inside the separate DLL's.
How can use this exception handler in POST request
if we are use Authorize attribute then How to handle Authorize exception handling?
I need a full course with real project multi language supporting with generate report and sending real time notification.
How to register Exception handler with logger in Program.cs?
nice
Simple and good. :)
if my app can not to connect to db then how this handler can help because in my code i cant throw excetion
You don't have to throw the exception explicitly. I was throwing them just for the demo.
Otherwise this Handler will catch all the exceptions.
Thanks sir
Your intention is right, but not clear; You have to stop and show the difference between two handlers.
can you show how to use this handler in console app
This is for Asp.Net core only
@@nitish.kaushik yes .net core console app. How to implement it on console app.
Asp. Net core is for web applications. Asp. Net core is a sub framework of dotnet core ecosystem and asp.net core is diff from console
Bad Approach for handling multiple exceptions types.. app.
You can handle multiple or even all exception types in one single exception handler.