mirror of
https://github.com/janet-lang/janet
synced 2025-10-22 03:07:41 +00:00
Rename to janet
This commit is contained in:
19
examples/error.janet
Normal file
19
examples/error.janet
Normal file
@@ -0,0 +1,19 @@
|
||||
# An example file that errors out. Run with ./janet examples/error.janet
|
||||
# to see stack trace for runtime errors.
|
||||
|
||||
(defn bork [x]
|
||||
|
||||
(defn bark [x]
|
||||
(print "Woof!")
|
||||
(print x)
|
||||
(error x)
|
||||
(print "Woof!"))
|
||||
|
||||
(bark (* 2 x))
|
||||
(bark (* 3 x)))
|
||||
|
||||
(defn pupper []
|
||||
(bork 3)
|
||||
1)
|
||||
|
||||
(do (pupper) 1)
|
Reference in New Issue
Block a user