mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
QIF Import: Throw an error immediately upon failing to parse a category. Previously a bad value was returned, which could then cause a failure in the caller.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18000 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
77c174f5c0
commit
908813cf34
@ -64,8 +64,13 @@
|
||||
#f))))
|
||||
rv)
|
||||
(begin
|
||||
;; Parsing failed. Bug detected!
|
||||
(gnc:warn "qif-split:parse-category: can't parse [" value "].")
|
||||
(list "" #f #f)))))
|
||||
(throw 'bug
|
||||
"qif-split:parse-category"
|
||||
"Can't parse account or category ~A."
|
||||
(list value)
|
||||
#f)))))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@ -457,8 +462,7 @@
|
||||
(lambda () (read))))
|
||||
date-parts))
|
||||
|
||||
;; if the date parts list doesn't have 3 parts, we're in
|
||||
;; trouble
|
||||
;; if the date parts list doesn't have 3 parts, we're in trouble
|
||||
(if (not (eq? 3 (length date-parts)))
|
||||
(gnc:warn "qif-parse:parse-date/format: can't interpret date ["
|
||||
date-string "]\nDate parts: " date-parts)
|
||||
|
Loading…
Reference in New Issue
Block a user