mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-25 22:20:28 +02:00
(handle-system-error): Pass rest argument to
display-backtrace for wrong-type-arg and out-of-range errors so that the bad value gets highlighted.
This commit is contained in:
parent
aa79839aac
commit
5d8d08494b
1 changed files with 11 additions and 6 deletions
|
@ -2448,12 +2448,17 @@
|
||||||
(let ((cep (current-error-port)))
|
(let ((cep (current-error-port)))
|
||||||
(cond ((not (stack? (fluid-ref the-last-stack))))
|
(cond ((not (stack? (fluid-ref the-last-stack))))
|
||||||
((memq 'backtrace (debug-options-interface))
|
((memq 'backtrace (debug-options-interface))
|
||||||
(run-hook before-backtrace-hook)
|
(let ((highlights (if (or (eq? key 'wrong-type-arg)
|
||||||
(newline cep)
|
(eq? key 'out-of-range))
|
||||||
(display "Backtrace:\n")
|
(list-ref args 3)
|
||||||
(display-backtrace (fluid-ref the-last-stack) cep)
|
'())))
|
||||||
(newline cep)
|
(run-hook before-backtrace-hook)
|
||||||
(run-hook after-backtrace-hook)))
|
(newline cep)
|
||||||
|
(display "Backtrace:\n")
|
||||||
|
(display-backtrace (fluid-ref the-last-stack) cep
|
||||||
|
#f #f highlights)
|
||||||
|
(newline cep)
|
||||||
|
(run-hook after-backtrace-hook))))
|
||||||
(run-hook before-error-hook)
|
(run-hook before-error-hook)
|
||||||
(apply display-error (fluid-ref the-last-stack) cep args)
|
(apply display-error (fluid-ref the-last-stack) cep args)
|
||||||
(run-hook after-error-hook)
|
(run-hook after-error-hook)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue