DOC: updated how ValueError is thrown