1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-27 00:40:26 +00:00
janet/examples/error.janet

20 lines
303 B
Plaintext
Raw Normal View History

2018-09-06 02:18:42 +00:00
# An example file that errors out. Run with ./janet examples/error.janet
2018-06-29 05:15:47 +00:00
# to see stack trace for runtime errors.
(defn bork [x]
(defn bark [x]
(print "Woof!")
(print x)
(error x)
(print "Woof!"))
2018-06-29 05:15:47 +00:00
(bark (* 2 x))
(bark (* 3 x)))
(defn pupper []
(bork 3)
1)
(do (pupper) 1)