Thursday, August 16, 2007

Error Messages

A lot of VBScripting recently has me seeing all sorts of vague error messages and I've got a thought: why can't they be less vague? For one thing, they're kind of stoic: "End Expected at line 148." Descriptive, but not much fun. For another thing, the syntactical error messages don't always tell you what's really wrong. If you name a function "ILikeBigButts(boolean BrotherLies)" and you accidentally invoke it with "ILikeBadonkadonk( true )" you'll get something talking about a type mismatch.

See that word? Mismatch, meaning that there are two things to match. But the truth of the matter is, there's no match to miss. The ILikeBadonkadonk function simply doesn't exist. Yes, I suppose nothing as a type does not match something but such existential queries probably don't need to be illustrated in the bowels of VBScript.

I suggest we update the error messages to be more colorful. Instead of "Type Mismatch," why not "That Shit Ain't Nowhere, Foo!" Or for "End Expected" we could have "Waiting for Armageddon" (Waiting for Armagodot...). For that matter, every other interface has the concept of "styles" down now, we should be able to customize development environments with error message styles. Personally, I'd go for "Dangerous Ganster Rapper Running from the Law". That'll really put the urgency into those messages.

No comments: