Throwing exception on NULL is a bit extreme, and unhelpful when it happens in rarely-tested error paths. Printing "(null)" is safer and provides compatibility with glibc sprintf. This was SVN commit r16180.
This was SVN commit r16178.
This was SVN commit r16177.
Refs #3011. This was SVN commit r16176.