Improved error reporting

This commit is contained in:
Craig Earls 2013-02-15 06:14:33 -07:00
parent 089716fb13
commit 7f0693bcdc
4 changed files with 4 additions and 10 deletions

View file

@ -19,12 +19,6 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
;; MA 02111-1307, USA.
;; A sample entry sorting function, which works if entry dates are of
;; the form YYYY/mm/dd.
;;; Commentary:
;; Helper functions to deal with commoditized numbers. A commoditized
;; number will be a cons of value and string where the string contains

View file

@ -132,7 +132,7 @@ Return tree structure"
(line-end-position))
(condition-case err
(ledger-add-transaction text t)
((error)
((error "ledger-complete-at-point")
(insert text))))
(forward-line)
(goto-char (line-end-position))

View file

@ -229,7 +229,7 @@ correct chronological place in the buffer."
(mapcar 'eval args)))
(goto-char (point-min))
(if (looking-at "Error: ")
(error (buffer-string))
(error (concat "Error in ledger-add-transaction: " (buffer-string))
(buffer-string)))
"\n"))
(progn

View file

@ -107,7 +107,7 @@ numbers"
"Return a buffer from WHERE the transaction is."
(if (bufferp (car where))
(car where)
(error "Buffer not set")))
(error "ledger-reconcile-get-buffer: Buffer not set")))
(defun ledger-reconcile-toggle ()
"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))
(unless (eobp)
(unless (looking-at "(")
(error (buffer-string)))
(error (concat "ledger-do-reconcile: " (buffer-string)))
(read (current-buffer)))))) ;current-buffer is the *temp* created above
(if (> (length xacts) 0)
(progn