[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Wed, 11 Mar 2020 19:07:41 +0100
consider the following piece of code:
$ cat test.scm
(use-modules (ice-9 regex))
(define (change text)
(regexp-substitute #f (string-match "string" text)
(change "there will be no match"))
When I run the script, I get a backtrace:
$ guile -s test.scm
1736:10 8 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
7 (apply-smob/0 #<thunk 2237960>)
718:2 6 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
619:8 5 (_ #(#(#<directory (guile-user) 225ef00>)))
2806:4 4 (save-module-excursion _)
4351:12 3 (_)
550:4 2 (call-with-output-string _)
260:13 1 (for-each #<procedure 290ed20 at ice-9/regex.scm:143:1…> …)
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.
Software Engineer, Red Hat
- Incomplete backtrace,
Jan Synacek <=