summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-01-22 14:32:00 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-01-23 22:03:15 +0100
commit40d1c7d43a6459aedf1c64a7f5e145ebbe4badcb (patch)
tree72ea3994e177b7bea9ec8c9764fc920f2995383b /lib/system
parent400b4e4e0ea33ef3d7ad94c503c5e00001dec536 (diff)
downloadNim-40d1c7d43a6459aedf1c64a7f5e145ebbe4badcb.tar.gz
OutOfMemError is never raised so there is no need to check for it (produce less code)
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/excpt.nim19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index e9d251bb4..2f41ad1e3 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -347,24 +347,17 @@ proc raiseExceptionAux(e: ref Exception) =
   if globalRaiseHook != nil:
     if not globalRaiseHook(e): return
   when defined(cpp) and not defined(noCppExceptions):
-    if e[] of OutOfMemError:
-      showErrorMessage(e.name)
-      quitOrDebug()
-    else:
-      pushCurrentException(e)
-      raiseCounter.inc
-      if raiseCounter == 0:
-        raiseCounter.inc # skip zero at overflow
-      e.raiseId = raiseCounter
-      {.emit: "`e`->raise();".}
+    pushCurrentException(e)
+    raiseCounter.inc
+    if raiseCounter == 0:
+      raiseCounter.inc # skip zero at overflow
+    e.raiseId = raiseCounter
+    {.emit: "`e`->raise();".}
   else:
     if excHandler != nil:
       if not excHandler.hasRaiseAction or excHandler.raiseAction(e):
         pushCurrentException(e)
         c_longjmp(excHandler.context, 1)
-    elif e[] of OutOfMemError:
-      showErrorMessage(e.name)
-      quitOrDebug()
     else:
       when hasSomeStackTrace:
         var buf = newStringOfCap(2000)