[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incomplete backtrace
From: |
Jan Synacek |
Subject: |
Incomplete backtrace |
Date: |
Wed, 11 Mar 2020 19:07:41 +0100 |
Hello,
consider the following piece of code:
$ cat test.scm
(use-modules (ice-9 regex))
(define (change text)
(regexp-substitute #f (string-match "string" text)
'pre
"something" 0
'post))
(define (main)
(change "there will be no match"))
(main)
When I run the script, I get a backtrace:
$ guile -s test.scm
Backtrace:
In ice-9/boot-9.scm:
1736:10 8 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
7 (apply-smob/0 #<thunk 2237960>)
In ice-9/boot-9.scm:
718:2 6 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
619:8 5 (_ #(#(#<directory (guile-user) 225ef00>)))
In ice-9/boot-9.scm:
2806:4 4 (save-module-excursion _)
4351:12 3 (_)
In ice-9/ports.scm:
550:4 2 (call-with-output-string _)
In ice-9/boot-9.scm:
260:13 1 (for-each #<procedure 290ed20 at ice-9/regex.scm:143:1…> …)
In ice-9/regex.scm:
64:2 0 (_ _)
Why do I not see the exact place where the problem is? Why are there
underscores instead? Why do I not even see that the error originated in
test.scm? I can't find any explanation about this in the manual.
While this code was extracted from a bigger program and it's obvious where
the problem is, it was super hard to figure it out in the original program.
Because the backtrace actually doesn't even point in the right place, it's
quite useless in my opinion.
Am I doing anything wrong? I use guile 3.0.1.
Regards,
--
Jan Synacek
Software Engineer, Red Hat
- Incomplete backtrace,
Jan Synacek <=