[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-recutils] Confusing error message
From: |
John Darrington |
Subject: |
[bug-recutils] Confusing error message |
Date: |
Wed, 3 Oct 2012 14:18:01 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I fed this input :
one,two,three
x,y,z
a,b,c,d
xx,yy,zz
into csv2rec
This (correctly) produced an error. But the error message is very terse and
IMO very confusing.
$ ./utils/csv2rec foo.csv
csv2rec: error: not enough headers$
1. There is no newline after the message, so the prompt appears directly after
the message, which is ugly.
Some shells (eg: zsh) don't even produce a prompt until it sees a newline,
so this will appear under zsh
to have hung.
2. 'not enough headers' might actually be wrong. More likely it's a case of
'too many non-header fields'.
3. The line number of the offending record is not given. So it would be
difficult to track down the
problem if the input was large.
I suggest a much more verbose and descriptive error, such as
csv2rec: file %s line %d: %d header fields were read, but this line contains %d
fields.
J'
--
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
signature.asc
Description: Digital signature
- [bug-recutils] Confusing error message,
John Darrington <=