mirror of
https://github.com/janet-lang/janet
synced 2025-02-13 07:10:01 +00:00
19 lines
281 B
Plaintext
19 lines
281 B
Plaintext
# An example file that errors out. Run with ./dst examples/error.dst
|
|
# to see stack trace for runtime errors.
|
|
|
|
(defn bark [x]
|
|
(print "Woof!")
|
|
(print x)
|
|
(error x)
|
|
(print "Woof!"))
|
|
|
|
(defn bork [x]
|
|
(bark (* 2 x))
|
|
(bark (* 3 x)))
|
|
|
|
(defn pupper []
|
|
(bork 3)
|
|
1)
|
|
|
|
(pupper)
|