validate added transaction before writing to file

This commit is contained in:
Simon Michael 2009-04-08 06:01:16 +00:00
parent 393e7d98d4
commit c521dc0bc2

View File

@ -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)