clearer error message when we can't balance an entry
This commit is contained in:
		
							parent
							
								
									0cfbced165
								
							
						
					
					
						commit
						861e2beb1c
					
				| @ -31,7 +31,7 @@ isEntryBalanced (Entry {etransactions=ts}) = isZeroMixedAmount sum | |||||||
| autofillEntry :: Entry -> Entry | autofillEntry :: Entry -> Entry | ||||||
| autofillEntry e@(Entry {etransactions=ts}) = e{etransactions=ts'} | autofillEntry e@(Entry {etransactions=ts}) = e{etransactions=ts'} | ||||||
|     where ts' = fromMaybe  |     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) |                 (autofillTransactions ts) | ||||||
| 
 | 
 | ||||||
| assertBalancedEntry :: Entry -> Entry | assertBalancedEntry :: Entry -> Entry | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user