mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 15:43:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			303 B
		
	
	
	
		
			Janet
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			303 B
		
	
	
	
		
			Janet
		
	
	
	
	
	
| # 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)
 | 
