clearer error message when we can't balance an entry

This commit is contained in:
Simon Michael 2008-10-16 04:00:45 +00:00
parent 0cfbced165
commit 861e2beb1c

View File

@ -31,7 +31,7 @@ isEntryBalanced (Entry {etransactions=ts}) = isZeroMixedAmount sum
autofillEntry :: Entry -> Entry
autofillEntry e@(Entry {etransactions=ts}) = e{etransactions=ts'}
where ts' = fromMaybe
(error $ "too many blank transactions in this entry:\n" ++ show e)
(error $ "too many missing amounts in this entry, could not auto-balance:\n" ++ show e)
(autofillTransactions ts)
assertBalancedEntry :: Entry -> Entry