OneTrueError - Automated exception handling

Monthly Archives: November 2010

Common mistakes when working with exceptions

There are a few mistakes that’s really common when it comes to exception handling and I though that I should write a small entry about them. Continue reading

Posted in CodeProject | Tagged | Leave a comment

Simplified localization for DataAnnotations

Update I’ve come up with a better localization method for MVC3. Read about it here. Original article The built in localization support in DataAnnotations is a bit hard to work with. You are supposed to do add the ResourceManager to … Continue reading

Posted in CodeProject | Tagged , | 5 Comments

InvalidOperationException: “Exception” in disguise? Or just the new ApplicationException?

Microsoft added ApplicationException with the idea that all exceptions that you made should derive it. Fair point, your should be able to handle your own exceptions, right? The problem is what nobody used it and therefore Microsoft changed it’s recommendation … Continue reading

Posted in Architecture, CodeProject | Tagged | Leave a comment

Why autogenerated mstests is bad for you!

ms can generate complete test classes for you that test and access all methods and properties, no matter if they are private or public. Isn’t that awesome? Well no. Let me do a statement first: I’m not fond of auto-generated … Continue reading

Posted in Architecture, CodeProject | Tagged , | Leave a comment

Do NOT catch that exception!

Ohhh, I’ve recently seen one to many application where the developers try to be safe by catching exceptions all over the place. It can be everything from a small simple method that doesn’t throw that many exceptions to a large method with multiple try/catch statements. Most of those catch blocks just logs the exception and rethrow it.

This post discusses how those problems can be solved. Continue reading

Posted in Architecture, CodeProject | Tagged | 6 Comments