From c5df73910f3ce1d54843cd2fbacd1d3a686e330d Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 5 Mar 2019 06:23:11 -0800 Subject: [PATCH] csv: update some parse errors which weren't in human format cf https://www.reddit.com/r/plaintextaccounting/comments/axekse/hledger_how_to_create_curved_brackets_with_rule/ --- hledger-lib/Hledger/Read/CsvReader.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hledger-lib/Hledger/Read/CsvReader.hs b/hledger-lib/Hledger/Read/CsvReader.hs index 426d51c7e..4416d572e 100644 --- a/hledger-lib/Hledger/Read/CsvReader.hs +++ b/hledger-lib/Hledger/Read/CsvReader.hs @@ -690,7 +690,7 @@ transactionFromCsvRecord sourcepos rules record = t where statuserror err = error' $ unlines ["error: could not parse \""++str++"\" as a cleared status (should be *, ! or empty)" - ,"the parse error is: "++show err + ,"the parse error is: "++customErrorBundlePretty err ] code = maybe "" render $ mfieldtemplate "code" description = maybe "" render $ mfieldtemplate "description" @@ -705,7 +705,7 @@ transactionFromCsvRecord sourcepos rules record = t ,"the amount rule is: "++(fromMaybe "" $ mfieldtemplate "amount") ,"the currency rule is: "++(fromMaybe "unspecified" $ mfieldtemplate "currency") ,"the default-currency is: "++fromMaybe "unspecified" mdefaultcurrency - ,"the parse error is: "++show err + ,"the parse error is: "++customErrorBundlePretty err ,"you may need to " ++"change your amount or currency rules, " ++"or "++maybe "add a" (const "change your") mskip++" skip rule" @@ -734,7 +734,7 @@ transactionFromCsvRecord sourcepos rules record = t ,"the balance rule is: "++(fromMaybe "" $ mfieldtemplate "balance") ,"the currency rule is: "++(fromMaybe "unspecified" $ mfieldtemplate "currency") ,"the default-currency is: "++fromMaybe "unspecified" mdefaultcurrency - ,"the parse error is: "++show err + ,"the parse error is: "++customErrorBundlePretty err ] -- build the transaction