lib: show txn's file position in assertion errors
This commit is contained in:
		
							parent
							
								
									92d5b0ab3d
								
							
						
					
					
						commit
						c9937db10e
					
				| @ -494,7 +494,11 @@ checkBalanceAssertion (errs,startbal) ps | |||||||
|                  (showMixedAmount finalsinglebal) |                  (showMixedAmount finalsinglebal) | ||||||
|                  (diffplus ++ showMixedAmount diff) |                  (diffplus ++ showMixedAmount diff) | ||||||
|                  (showPostingLine p) |                  (showPostingLine p) | ||||||
|                  (maybe "" (("in transaction:\n"++).show) $ ptransaction p) |                  (case ptransaction p of | ||||||
|  |                     Nothing -> "" | ||||||
|  |                     Just t -> printf "in transaction at %s line %d:\n%s" f l (show t) | ||||||
|  |                               where GenericSourcePos f l _ = tsourcepos t | ||||||
|  |                  ) | ||||||
| 
 | 
 | ||||||
| -- Given a sequence of postings to a single account, split it into | -- Given a sequence of postings to a single account, split it into | ||||||
| -- sub-sequences consisting of ordinary postings followed by a single | -- sub-sequences consisting of ordinary postings followed by a single | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user