OutOfMemError is never raised so there is no need to check for it (produce less code)

This commit is contained in:
Araq 2019-01-22 14:32:00 +01:00 • committed by Andreas Rumpf
commit 40d1c7d43a

View file

@ -347,10 +347,6 @@ 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:
@ -362,9 +358,6 @@ proc raiseExceptionAux(e: ref Exception) =
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)