Welcome to AspAdvice Sign in | Join | Help

Browse by Tags

All Tags » exception handling   (RSS)

Don't eat exceptions

This is very bad! try { //do something that will throw an exception, like try to commit data to a database with malformed sql } catch { //sweep the dirt under the rug ;) } Consequences/Results - Your boss will not see any exceptions or code crashes, but
Posted by salibhai | 0 Comments
Filed under: ,

Use .TryParse instead of Try {} Catch {}

In certain conditions, we should not be using exceptions. For example, Try Catch blocks can be avoided in certain cases. If you have some .NET 1.0 code, you might not be taking advantage of .NET 2.0 new TryParse functions, which avoid exception handling
Posted by salibhai | 1 Comments
Filed under: ,