new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
30
tests/exception/tcontinuexc.nim
Normal file
30
tests/exception/tcontinuexc.nim
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
discard """
|
||||
file: "tcontinuexc.nim"
|
||||
outputsub: "ECcaught"
|
||||
exitcode: "1"
|
||||
"""
|
||||
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")
|
||||
|
||||
try:
|
||||
for i in 0..3:
|
||||
try:
|
||||
genErrors("error!")
|
||||
except ESomething:
|
||||
stdout.write("E")
|
||||
stdout.write("C")
|
||||
raise newException(EsomeotherErr, "bla")
|
||||
finally:
|
||||
echo "caught"
|
||||
|
||||
#OUT ECcaught
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue