Exceptions

I ran across a good post about exception handling here.

It got me thinking about my own way of handling exceptions in relation to what in the article is described as best practices (The term “best practices” is a bit of a rabbit hole in itself, but I’ll save that for another time).

Almost all of the things in the article I’m already doing or know about, but the thing that was most interesting was the part about decorating exceptions, – I had no idea that was a thing!

Most of the time, when debugging applications, I know from where the exception is being thrown but I wish I had some more context about it afterwards. This is where the decorating part can be quite handy. Keeping a mental note about that the next time I’m dealing with exceptions.