Tag Archives: exceptions
Throwing exceptions is in itself trivial. Just invoke throw with an exception object. But when should you throw? Should you create a new exception or rethrow an old one? What should you include in the exception info?
This article will teach you how you should design your exception classes. It’s a follow up to my previous article which told you what exceptions are and their intended usage.
This blog has been quiet for a while. I am currently writing a book about localization. Me and my partner is also getting close to release of our new startup. One of it’s features is to automatically catch unhandled exceptions … Continue reading
I got a client which is really firm on that the user should know what went wrong when exceptions are thrown. So we are displaying error messages like “The database did not respond” “The database operation failed” “Failed to load … Continue reading
I’ve written several posts about exceptions. For instance when you should catch them or how you should design them. In this post I’ll discuss when you should throw exceptions. Exceptions are thrown when something exceptional have happended. But what does … Continue reading
There are several blog posts regarding error handling for ASP.NET MVC. They use everything from Application_Error to exception handling in the base controller. With this post I’ll show how you can use the built in features in MVC to treat … Continue reading
This will be my final piece on exception handling. It’s been fun, but the show must go on, right? Got any suggestion on what I should rant about in this blog? Leave a comment.
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
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
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