Catch(Exception)
Why do not we use catch(Exception) in Asp.net?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SenthilkumarPosted Mar 13, 2012, 1:49 AM
Run time needs to find the appropriate filter(catch) and it needs to check with local os.
carefully flushes the stack executes the finally blocks and transfer over than dump utility.
The stack trace preparation is costly in the operating system and it needs to prepare the exception table which inherits from the base class.
The ASP.Net execution engine needs to find the matching exception with the local os and it will load all the required details for the exception.
Thats why we need to use the exception only when its required.
As a programmer, we should not where the possibility of error occurs. We have to handle in the programming and if you suspect the error may come then you have to go for exception.
If it is useful then mark it as "Accepted Answer"