Improved error reporting
This commit is contained in:
parent
089716fb13
commit
7f0693bcdc
4 changed files with 4 additions and 10 deletions
|
|
@ -19,12 +19,6 @@
|
||||||
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
;; MA 02111-1307, USA.
|
;; MA 02111-1307, USA.
|
||||||
|
|
||||||
;; A sample entry sorting function, which works if entry dates are of
|
|
||||||
;; the form YYYY/mm/dd.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Helper functions to deal with commoditized numbers. A commoditized
|
;; Helper functions to deal with commoditized numbers. A commoditized
|
||||||
;; number will be a cons of value and string where the string contains
|
;; number will be a cons of value and string where the string contains
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ Return tree structure"
|
||||||
(line-end-position))
|
(line-end-position))
|
||||||
(condition-case err
|
(condition-case err
|
||||||
(ledger-add-transaction text t)
|
(ledger-add-transaction text t)
|
||||||
((error)
|
((error "ledger-complete-at-point")
|
||||||
(insert text))))
|
(insert text))))
|
||||||
(forward-line)
|
(forward-line)
|
||||||
(goto-char (line-end-position))
|
(goto-char (line-end-position))
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ correct chronological place in the buffer."
|
||||||
(mapcar 'eval args)))
|
(mapcar 'eval args)))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(if (looking-at "Error: ")
|
(if (looking-at "Error: ")
|
||||||
(error (buffer-string))
|
(error (concat "Error in ledger-add-transaction: " (buffer-string))
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
"\n"))
|
"\n"))
|
||||||
(progn
|
(progn
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ numbers"
|
||||||
"Return a buffer from WHERE the transaction is."
|
"Return a buffer from WHERE the transaction is."
|
||||||
(if (bufferp (car where))
|
(if (bufferp (car where))
|
||||||
(car where)
|
(car where)
|
||||||
(error "Buffer not set")))
|
(error "ledger-reconcile-get-buffer: Buffer not set")))
|
||||||
|
|
||||||
(defun ledger-reconcile-toggle ()
|
(defun ledger-reconcile-toggle ()
|
||||||
"Toggle the current transaction, and mark the recon window."
|
"Toggle the current transaction, and mark the recon window."
|
||||||
|
|
@ -273,7 +273,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(unless (eobp)
|
(unless (eobp)
|
||||||
(unless (looking-at "(")
|
(unless (looking-at "(")
|
||||||
(error (buffer-string)))
|
(error (concat "ledger-do-reconcile: " (buffer-string)))
|
||||||
(read (current-buffer)))))) ;current-buffer is the *temp* created above
|
(read (current-buffer)))))) ;current-buffer is the *temp* created above
|
||||||
(if (> (length xacts) 0)
|
(if (> (length xacts) 0)
|
||||||
(progn
|
(progn
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue