summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-07-07 23:16:13 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-07-08 08:16:13 +0200
commitbefca425c47397ad02821fd965db0250b8897ddb (patch)
tree38bae769eb72ec10c1d277206366bf6276ff4240
parenta6c3bbf01a144ee2d6d3ca5f8032c52877560972 (diff)
downloadNim-befca425c47397ad02821fd965db0250b8897ddb.tar.gz
workaround issue #8223 nim doc fails with doAssertRaises (#8245)
-rw-r--r--lib/system.nim11
1 files 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