This commit is contained in:
Andreas Rumpf 2018-07-17 18:21:09 +02:00
commit ae09879b3a

View file

@ -4128,11 +4128,10 @@ template doAssertRaises*(exception, code: untyped): typed =
## .. code-block:: nim ## .. code-block:: nim
## doAssertRaises(ValueError): ## doAssertRaises(ValueError):
## raise newException(ValueError, "Hello World") ## raise newException(ValueError, "Hello World")
# TODO: investigate why runnableExamples here caused
# https://github.com/nim-lang/Nim/issues/8223
var wrong = false var wrong = false
try: try:
code if true:
code
wrong = true wrong = true
except exception: except exception:
discard discard