1
0
mirror of https://github.com/janet-lang/janet synced 2025-04-28 21:53:19 +00:00

Update error reporting.

This commit is contained in:
Calvin Rose 2018-03-21 21:48:19 -04:00
parent b06befc58d
commit 82845bc7a3

View File

@ -543,8 +543,7 @@ onvalue."
(defn default-error-handler (defn default-error-handler
[t x f] [t x f]
(print) (file-write stdout (string t " error: "))
(file-write stdout "error: ")
(pp x) (pp x)
(when f (when f
(def st (fiber-stack f)) (def st (fiber-stack f))
@ -563,8 +562,7 @@ onvalue."
(when func (file-write stdout (string " " func))) (when func (file-write stdout (string " " func)))
(when pc (file-write stdout (string " (pc=" pc ")"))) (when pc (file-write stdout (string " (pc=" pc ")")))
(when tail (file-write stdout " (tailcall)")) (when tail (file-write stdout " (tailcall)"))
(file-write stdout "\n"))) (file-write stdout "\n"))))
(print))
(def require (do (def require (do
(def cache @{}) (def cache @{})