OutOfMemError is never raised so there is no need to check for it (produce less code)
This commit is contained in:
parent
400b4e4e0e
commit
40d1c7d43a
1 changed files with 6 additions and 13 deletions
|
|
@ -347,10 +347,6 @@ proc raiseExceptionAux(e: ref Exception) =
|
||||||
if globalRaiseHook != nil:
|
if globalRaiseHook != nil:
|
||||||
if not globalRaiseHook(e): return
|
if not globalRaiseHook(e): return
|
||||||
when defined(cpp) and not defined(noCppExceptions):
|
when defined(cpp) and not defined(noCppExceptions):
|
||||||
if e[] of OutOfMemError:
|
|
||||||
showErrorMessage(e.name)
|
|
||||||
quitOrDebug()
|
|
||||||
else:
|
|
||||||
pushCurrentException(e)
|
pushCurrentException(e)
|
||||||
raiseCounter.inc
|
raiseCounter.inc
|
||||||
if raiseCounter == 0:
|
if raiseCounter == 0:
|
||||||
|
|
@ -362,9 +358,6 @@ proc raiseExceptionAux(e: ref Exception) =
|
||||||
if not excHandler.hasRaiseAction or excHandler.raiseAction(e):
|
if not excHandler.hasRaiseAction or excHandler.raiseAction(e):
|
||||||
pushCurrentException(e)
|
pushCurrentException(e)
|
||||||
c_longjmp(excHandler.context, 1)
|
c_longjmp(excHandler.context, 1)
|
||||||
elif e[] of OutOfMemError:
|
|
||||||
showErrorMessage(e.name)
|
|
||||||
quitOrDebug()
|
|
||||||
else:
|
else:
|
||||||
when hasSomeStackTrace:
|
when hasSomeStackTrace:
|
||||||
var buf = newStringOfCap(2000)
|
var buf = newStringOfCap(2000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue