Here’s the thing. I <3 productivity. So, as I’ve yelled about Java’s exceptions before and how time consuming they are to write, I decided to do something about it.

And so, I present to you, the Exception class generator. It’s command-line, because I roll like that. It’s very easy to use, and it’s RIT coding standards compliant. Here’s how it works:

java ExceptionCreator name author [description]

Let’s look at that. Say I wanted to create an exception called HeadUnlikeAHoleException. I would be the author, and for a description, I’d want something like “This exception gets thrown whenever the head is unlike a hole.” Here’s how my command would look:

$ java ExceptionCreator HeadUnlikeAHoleException "Steve Streza&#8217;" "This exception gets thrown whenever the head is unlike a hole."

Here’s the output.

Again, this class is 100% RIT coding standards compliant. I’m sure they might yell about the fact that you’re generating code, but its an exception. You’re practically copy-pasting every time anyway.

Think it’s too good to be true? Check it out yourself! (You’ll note that that class is very much not RIT coding standards compliant by any means. Think of it as my little attempt at fighting the man.