forked from ground/ground
Add catch support
This commit is contained in:
13
tests/catch.grnd
Normal file
13
tests/catch.grnd
Normal file
@@ -0,0 +1,13 @@
|
||||
fun !throws -int
|
||||
throw "MyError" "longer error message"
|
||||
endfun
|
||||
|
||||
catch "MyError" %catcher
|
||||
|
||||
call !throws &res
|
||||
|
||||
end 0
|
||||
|
||||
@catcher
|
||||
println "ruh roh"
|
||||
end 1
|
||||
Reference in New Issue
Block a user