unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#46009: (backtrace) crash, string->number: Wrong type argument in position 1 (expecting string): #f
@ 2021-01-20 22:46 Christopher Baines
  0 siblings, 0 replies; only message in thread
From: Christopher Baines @ 2021-01-20 22:46 UTC (permalink / raw)
  To: 46009

[-- Attachment #1: Type: text/plain, Size: 1398 bytes --]


It seems that with-exception-handler might be breaking
false-if-exception inside terminal-width from (system repl debug).

I've come across this when trying to use with-exception-handler to print
backtraces for exceptions.


→ cat backtrace-crash.scm

(peek "COLUMNS" (getenv "COLUMNS"))

(with-exception-handler
    (lambda (exn)
      (backtrace))
  (lambda ()
    (+ 1 a)))


→ echo $COLUMNS
84


→ guile --no-auto-compile backtrace-crash.scm

;;; ("COLUMNS" #f)

Backtrace:
Backtrace:
          10 (primitive-load "/home/chris/Projects/Guix/guix-build-c…")
In ice-9/boot-9.scm:
  1736:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/eval.scm:
    159:9  8 (_ _)
   223:20  7 (proc #(#(#<directory (guile-user) 7f32e7dfbc80>)))
In unknown file:
           6 (%resolve-variable (7 . a) #<directory (guile-user) 7f3…>)
In ice-9/boot-9.scm:
  1669:16  5 (raise-exception _ #:continuable? _)
In unknown file:
           4 (backtrace #<undefined>)
In system/repl/debug.scm:
   148:36  3 (print-frames #(#<frame 7f32e6a22f30 backtrace> #<f…> …) …)
    72:20  2 (_)
In ice-9/boot-9.scm:
  1731:15  1 (with-exception-handler #<procedure 7f32e7e937b0 at ic…> …)
In system/repl/debug.scm:
    72:40  0 (_)

system/repl/debug.scm:72:40: In procedure string->number: Wrong type argument in position 1 (expecting string): #f

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-20 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20 22:46 bug#46009: (backtrace) crash, string->number: Wrong type argument in position 1 (expecting string): #f Christopher Baines

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).