This commit is contained in:
Araq 2015-04-27 23:11:36 +02:00
commit c6398d408d
9 changed files with 107 additions and 81 deletions

View file

@ -4,8 +4,8 @@ success'''
"""
type
ESomething = object of E_Base
ESomeOtherErr = object of E_Base
ESomething = object of Exception
ESomeOtherErr = object of Exception
proc genErrors(s: string) =
if s == "error!":
@ -17,14 +17,14 @@ proc foo() =
var i = 0
try:
inc i
onRaise(proc (e: ref E_Base): bool =
onRaise(proc (e: ref Exception): bool =
echo "i: ", i)
genErrors("errssor!")
except ESomething:
echo("ESomething happened")
except:
echo("Some other error happened")
# test that raise handler is gone:
try:
genErrors("error!")