Issue #250: improve error message for costs without an amount (blais/beancount)

11 views
Skip to first unread message

Martin Michlmayr

unread,
Mar 21, 2018, 8:34:21 AM3/21/18
to bean...@googlegroups.com
New issue 250: improve error message for costs without an amount
https://bitbucket.org/blais/beancount/issues/250/improve-error-message-for-costs-without-an

Martin Michlmayr:

With:

```
2017-01-01 open Assets:Rewards
2017-01-01 open Equity:Opening-balance

2017-01-01 * "Marriott certificate"
Assets:Rewards 1 MARRIOTT4 {"expiration: 2017-08-17"}
Equity:Opening-balance
```

I get:

```
...:7: Failed to categorize posting 0
```

This error message could be improved to say the cost is missing the amount.

BTW, should a cost without an amount be allowed? I guess not, but I could use the built-in mechanism to ensure I remove the correct "lot" (in ledger terms). But I guess I can put the info in a metadata variable and write a plugin to ensure the same. Just seems like a duplication of error. (Maybe there's an elegant way to do this already?)


Reply all
Reply to author
Forward
0 new messages