mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Scheme: Send backtraces to the gnucash.trace log as well as the console.
BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17209 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5743752704
commit
d2683f020f
@ -130,8 +130,18 @@
|
||||
(define (gnc:backtrace-if-exception proc . args)
|
||||
(define (dumper key . args)
|
||||
(let ((stack (make-stack #t dumper)))
|
||||
;; Send debugging output to the console.
|
||||
(display-backtrace stack (current-error-port))
|
||||
(apply display-error stack (current-error-port) args)
|
||||
|
||||
;; Send debugging output to the log.
|
||||
(if (defined? 'gnc:warn)
|
||||
(let ((string-port (open-output-string)))
|
||||
(display-backtrace stack string-port)
|
||||
(apply display-error stack string-port args)
|
||||
(gnc:warn (get-output-string string-port))
|
||||
(close-output-port string-port)))
|
||||
|
||||
(throw 'ignore)))
|
||||
|
||||
(catch
|
||||
|
Loading…
Reference in New Issue
Block a user