From c521dc0bc253ee1ed0caaf2d20e0cf7fb96c63c1 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Wed, 8 Apr 2009 06:01:16 +0000 Subject: [PATCH] validate added transaction before writing to file --- AddCommand.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AddCommand.hs b/AddCommand.hs index 0b7086224..23ddb8854 100644 --- a/AddCommand.hs +++ b/AddCommand.hs @@ -41,8 +41,8 @@ getAndAddTransactions l = (do ,ltdescription=description ,ltpostings=ps } - appendToLedgerFile l $ show t registerFromString (show t) >>= putStrLn + appendToLedgerFile l $ show t liftM (t:) (getAndAddTransactions l) ) `catch` (\e -> if isEOFError e then return [] else ioError e)