Proof that there are Hitchhiker fans in the JScript UE team...

Here's an example I just found in the MSDN JScript documentation:

The following example illustrates a use of the Error object.

try {
// Throw an error.
throw new Error(42,"No question");
}
catch(e) {
print(e);
// Extract the error code from the error number.
print(e.number & 0xFFFF);
print(e.description);
}


The output of this code is:

Error: No question
42
No question


While it's not uncommon to find geeky references in software documentation, it's the first time I spot something like that in MSDN.

2 Comments

  • You appreciate, I hope, that cultural references in documentation are highly discouraged due to problems with localization. This one is benign, I would guess -- the string can safely be meaningless without the cultural context (although what's a reader to make of a meaningless error string?). But the general rule (unfortunately, perhaps) is that bland is best. In fact, one occasionaly hears the verb "to blandize" to describe the process of removing "interesting" stuff from examples.

  • I do, Mike, that's why I thought it interesting to find this "unblandized" sample. The reference here is actually quite subtle, which probably explains why it wasn't spotted.

Comments have been disabled for this content.