PreviousNext…

Showing & telling about Exceptions

OK, let’s make this a “kinda” Show-n-tell Thursday post. I think this is timely given the current talk around using Java in Domino. Today, a new article popped up in my newsreader from the java.net site. It’s a good ’un:

Exception-Handling Antipatterns.

It took a while for me to get my head around exceptions. In fact, it didn’t really all click until last summer, when I found myself putting together a reasonably complex application (nothing to do with Domino) in Websphere. I ended up cutting some package-specific Exception classes, and they worked really well once I’d figured out how many I needed and when to throw them. Once you “get” exceptions, you will be amazed at how much cleaner your code is—don’t shy away from coding your own Exception classes if that’s what it takes! There isn’t that much to ’em, honest, and by golly, it’s great using exceptions after having to type out things like On Error Goto ErrHandler

Comments on this post are now closed.

About

I’m a software architect / developer / general IT wrangler specialising in web, mobile web and middleware using things like node.js, Java, C#, PHP, HTML5 and more.

Best described as a simpleton, but kindly. You can read more here.

";