Change RuntimeError to ValueError for consistency with behaviour e.g. of numpy ufuncs. Add unit test for buffer-mode query_disc