[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incomplete backtrace
From: |
Jan Synacek |
Subject: |
Re: Incomplete backtrace |
Date: |
Wed, 11 Mar 2020 19:16:13 +0100 |
On Wed, Mar 11, 2020 at 7:07 PM Jan Synacek <address@hidden> wrote:
> 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 (_ _)
>
I forgot one line in the backtrace output:
ice-9/regex.scm:64:2: In procedure vector-ref: Wrong type argument in
position 1 (expecting vector): #f
Which sort of gives a hint, but not really...
--
Jan Synacek
Software Engineer, Red Hat