added tests
This commit is contained in:
parent
6c20509121
commit
b34b1dbc6c
7 changed files with 172 additions and 0 deletions
17
tests/accept/run/treraise.nim
Normal file
17
tests/accept/run/treraise.nim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue