mirror of
https://github.com/janet-lang/janet
synced 2025-04-04 06:16:55 +00:00
don't crash repl if someone sets a bad *pretty-format*
This commit is contained in:
parent
33d1371186
commit
874fd2aba7
@ -2877,7 +2877,12 @@
|
||||
(if (= :dead fs)
|
||||
(when is-repl
|
||||
(put env '_ @{:value x})
|
||||
(printf (get env *pretty-format* "%q") x)
|
||||
(def pf (get env *pretty-format* "%q"))
|
||||
(try
|
||||
(printf pf x)
|
||||
([e]
|
||||
(eprintf "bad pretty format %v: %v" pf e)
|
||||
(eflush)))
|
||||
(flush))
|
||||
(do
|
||||
(debug/stacktrace f x "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user