roi: show errors without a traceback
This commit is contained in:
		
							parent
							
								
									8984591f58
								
							
						
					
					
						commit
						536bea2a78
					
				| @ -214,8 +214,8 @@ internalRateOfReturn showCashFlow prettyTables (OneSpan spanBegin spanEnd valueB | |||||||
| #endif | #endif | ||||||
|         (0.000000000001,10000) (interestSum spanEnd totalCF) of |         (0.000000000001,10000) (interestSum spanEnd totalCF) of | ||||||
|         Root rate -> return ((rate-1)*100) |         Root rate -> return ((rate-1)*100) | ||||||
|         NotBracketed -> error "Error: No solution -- not bracketed." |         NotBracketed -> error' "Error: No solution -- not bracketed." | ||||||
|         SearchFailed -> error "Error: Failed to find solution." |         SearchFailed -> error' "Error: Failed to find solution." | ||||||
| 
 | 
 | ||||||
| type CashFlow = [(Day, Quantity)] | type CashFlow = [(Day, Quantity)] | ||||||
| 
 | 
 | ||||||
| @ -236,5 +236,5 @@ unMix :: MixedAmount -> Quantity | |||||||
| unMix a = | unMix a = | ||||||
|   case (normaliseMixedAmount $ mixedAmountCost a) of |   case (normaliseMixedAmount $ mixedAmountCost a) of | ||||||
|     (Mixed [a]) -> aquantity a |     (Mixed [a]) -> aquantity a | ||||||
|     _ -> error "MixedAmount failed to normalize" |     _ -> error' "MixedAmount failed to normalize" | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user