fixes #1888
This commit is contained in:
parent
b34bd3b163
commit
c6398d408d
9 changed files with 107 additions and 81 deletions
|
|
@ -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!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue