From fe6f37753f8566695b8d9b86d05dd98c2ba3ad0a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 28 Sep 2011 00:14:42 +0000 Subject: [PATCH] convert: give an error instead of a silent zero amount from amount-in-field/amount-in-field --- hledger/Hledger/Cli/Convert.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hledger/Hledger/Cli/Convert.hs b/hledger/Hledger/Cli/Convert.hs index 7aee2f8aa..43fcba82a 100644 --- a/hledger/Hledger/Cli/Convert.hs +++ b/hledger/Hledger/Cli/Convert.hs @@ -481,7 +481,7 @@ getAmount rules fields = case amountField rules of case (c, d) of (x, "") -> x ("", x) -> "-"++x - _ -> "" + p -> error' $ "using amount-in-field and amount-out-field, found a value in both fields: "++show p where c = maybe "" (atDef "" fields) (inField rules) d = maybe "" (atDef "" fields) (outField rules)