roi: show errors without a traceback

This commit is contained in:
Simon Michael 2020-06-21 11:02:16 -07:00
parent 8984591f58
commit 536bea2a78

View File

@ -214,8 +214,8 @@ internalRateOfReturn showCashFlow prettyTables (OneSpan spanBegin spanEnd valueB
#endif
(0.000000000001,10000) (interestSum spanEnd totalCF) of
Root rate -> return ((rate-1)*100)
NotBracketed -> error "Error: No solution -- not bracketed."
SearchFailed -> error "Error: Failed to find solution."
NotBracketed -> error' "Error: No solution -- not bracketed."
SearchFailed -> error' "Error: Failed to find solution."
type CashFlow = [(Day, Quantity)]
@ -236,5 +236,5 @@ unMix :: MixedAmount -> Quantity
unMix a =
case (normaliseMixedAmount $ mixedAmountCost a) of
(Mixed [a]) -> aquantity a
_ -> error "MixedAmount failed to normalize"
_ -> error' "MixedAmount failed to normalize"