Use the builtin mechanism for Sphinx extensions to raise errors.  This provides source file and line number.