summary refs log tree commit diff stats
path: root/lib/system/excpt.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-10 00:17:20 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-10 00:17:20 +0200
commit3308d265816b342a842e7cabef492a54ea722e74 (patch)
tree32788a1ad2e87f84464270d5cf01dd85fbe2571a /lib/system/excpt.nim
parentdb0d3532813b96c431c05b2dbfcdc84980a791a6 (diff)
downloadNim-3308d265816b342a842e7cabef492a54ea722e74.tar.gz
breaking change: arrays of char do not convert to cstring; ptr to array of char does
Diffstat (limited to 'lib/system/excpt.nim')
-rw-r--r--lib/system/excpt.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index cee4e33a5..950981227 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -289,8 +289,12 @@ proc raiseExceptionAux(e: ref Exception) =
         add(buf, " [")
         xadd(buf, e.name, e.name.len)
         add(buf, "]\n")
-        unhandled(buf):
-          showErrorMessage(buf)
+        when defined(nimNoArrayToCstringConversion):
+          template tbuf(): untyped = addr buf
+        else:
+          template tbuf(): untyped = buf
+        unhandled(tbuf()):
+          showErrorMessage(tbuf())
           quitOrDebug()
 
 proc raiseException(e: ref Exception, ename: cstring) {.compilerRtl.} =