Forum Discussion
_Mmesa1984
Mar 02, 2020Copper Contributor
Why Stored Procedure throws exception during transaction?
Hello everyone? I will post in english but I am an spanish speaker!! So let's try to do this..... I am stocked with an issue working with ado.net and sql server2009. the problem is when i call ...
vassilis-MSFT
Mar 06, 2020Learn Expert
Hi _Mmesa1984,
the answer is in your description: attend to the user input and output only the error description -if you have to- and not the exception details to the end-user. Exceptions should be logged for the developer and not for end-users. Instead, try to inform the user on the wrong input or use proper input controls to validate the user input which has always been the Achilles heel of every application 🙂
Also, don't forget to put your code inside try-catch-finally blocks to eliminate the application exceptions and hanging of your app.
HTH,
Vassilis