]> git.donarmstrong.com Git - samtools.git/commitdiff
more informative error message
authorHeng Li <lh3@live.co.uk>
Fri, 3 Dec 2010 20:28:15 +0000 (20:28 +0000)
committerHeng Li <lh3@live.co.uk>
Fri, 3 Dec 2010 20:28:15 +0000 (20:28 +0000)
bcftools/bcf.c

index 6e45695cfb8c35a22dc4699728e445129293a699..b749847d2fc1ce7ca5e5cea755258cdb570a8358 100644 (file)
@@ -106,7 +106,7 @@ int bcf_sync(bcf1_t *b)
        for (p = b->str, n = 0; p < b->str + b->l_str; ++p)
                if (*p == 0 && p+1 != b->str + b->l_str) tmp[n++] = p + 1;
        if (n != 5) {
-               fprintf(stderr, "[%s] incorrect number of fields (%d != 5). Corrupted file?\n", __func__, n);
+               fprintf(stderr, "[%s] incorrect number of fields (%d != 5) at %d:%d\n", __func__, n, b->tid, b->pos);
                return -1;
        }
        b->ref = tmp[0]; b->alt = tmp[1]; b->flt = tmp[2]; b->info = tmp[3]; b->fmt = tmp[4];