❔ Catch all the exception
Hi, I'm trying to catch all the exceptions being thrown, Is that possible?
5 Replies
AddNewUser.cs
UserController.cs
I suggest you to read up on this article (and find more similar)
https://headsigned.com/posts/stop-using-exceptions-for-flow-control/
What do you want to do when you catch an exception?
If I add an User I need to input the userRoleId and departmentId. If userRoleId and DepartmentId is not exist I want to cath those two exception from useerRoleId and departmentId exceptions
I'll take look on this thanks
Ohhh I've read an article about this. Thank you so much!!!
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.
Was this issue resolved? If so, run /close
- otherwise I will mark this as stale and this post will be archived until there is new activity.