unhelpful error messages
February 7th, 2007
So, in ColdFusion, you can specify that you would like arguments to a method to be of a particular “type” – the word is used loosely here because ColdFusion doesn’t distinguish between different types of variables per se. For instance, a number, a string, and a boolean all are considered “Simple Values”, but I can’t query a variable to see if it is actually a string of text or an integer (useless!).
Well that’s all well and good, we like to enforce type checking where appropriate. So what happens, you wonder, when you do not pass the correct type to a method? The ultimately, incredibly, here’s a big fuck you… “The argument X passed to function Y is not of type Z”. That’s great, I mean really, kudos. But what would be really useful to me, as a programmer, trying to fix this problem? How about what type of object it actually is?
Sorry, comments are closed for this article.