added tests

This commit is contained in:
Andreas Rumpf 2010-05-28 23:33:29 +02:00
commit b34b1dbc6c
7 changed files with 172 additions and 0 deletions

View file

@ -0,0 +1,17 @@
type
ESomething = object of E_Base
ESomeOtherErr = object of E_Base
proc genErrors(s: string) =
if s == "error!":
raise newException(ESomething, "Test")
else:
raise newException(EsomeotherErr, "bla")
while True:
try:
genErrors("errssor!")
except ESomething:
echo("Error happened")
except:
raise