From befca425c47397ad02821fd965db0250b8897ddb Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Sat, 7 Jul 2018 23:16:13 -0700 Subject: [PATCH] workaround issue #8223 nim doc fails with doAssertRaises (#8245) --- lib/system.nim | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/system.nim b/lib/system.nim index d59551d54..9e91bc7db 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -4123,10 +4123,13 @@ else: template doAssertRaises*(exception, code: untyped): typed = ## Raises ``AssertionError`` if specified ``code`` does not raise the - ## specified exception. - runnableExamples: - doAssertRaises(ValueError): - raise newException(ValueError, "Hello World") + ## specified exception. Example: + ## + ## .. code-block:: nim + ## doAssertRaises(ValueError): + ## raise newException(ValueError, "Hello World") + # TODO: investigate why runnableExamples here caused + # https://github.com/nim-lang/Nim/issues/8223 var wrong = false try: code