Provide a more useful error for invalid column values.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
This commit is contained in:
parent
eadf33033f
commit
e8e4546870
1 changed files with 5 additions and 1 deletions
|
|
@ -369,7 +369,11 @@ class Schema:
|
|||
elif rectype in ['pvu', 'preview']:
|
||||
pass
|
||||
elif rectype in ['col', 'column']:
|
||||
self._columns = int(i.fields[1])
|
||||
try:
|
||||
self._columns = int(i.fields[1])
|
||||
except ValueError:
|
||||
raise newfol.exception.SchemaError("has non-integral " +
|
||||
"number of columns")
|
||||
elif rectype in ['txn', 'transaction']:
|
||||
self._txntype = i.fields[1:]
|
||||
elif rectype in ['dpy', 'display']:
|
||||
|
|
|
|||
Loading…
Reference in a new issue