change system.nim to adhere to the style guide
This commit is contained in:
parent
05964b95e4
commit
5c25b93898
1 changed files with 8 additions and 8 deletions
|
|
@ -60,7 +60,7 @@ var
|
||||||
# list of exception handlers
|
# list of exception handlers
|
||||||
# a global variable for the root of all try blocks
|
# a global variable for the root of all try blocks
|
||||||
currException {.threadvar.}: ref Exception
|
currException {.threadvar.}: ref Exception
|
||||||
raise_counter {.threadvar.}: uint
|
raiseCounter {.threadvar.}: uint
|
||||||
|
|
||||||
gcFramePtr {.threadvar.}: GcFrame
|
gcFramePtr {.threadvar.}: GcFrame
|
||||||
|
|
||||||
|
|
@ -122,12 +122,12 @@ proc popCurrentException {.compilerRtl, inl.} =
|
||||||
|
|
||||||
proc popCurrentExceptionEx(id: uint) {.compilerRtl.} =
|
proc popCurrentExceptionEx(id: uint) {.compilerRtl.} =
|
||||||
# in cpp backend exceptions can pop-up in the different order they were raised, example #5628
|
# in cpp backend exceptions can pop-up in the different order they were raised, example #5628
|
||||||
if currException.raise_id == id:
|
if currException.raiseId == id:
|
||||||
currException = currException.up
|
currException = currException.up
|
||||||
else:
|
else:
|
||||||
var cur = currException.up
|
var cur = currException.up
|
||||||
var prev = currException
|
var prev = currException
|
||||||
while cur != nil and cur.raise_id != id:
|
while cur != nil and cur.raiseId != id:
|
||||||
prev = cur
|
prev = cur
|
||||||
cur = cur.up
|
cur = cur.up
|
||||||
if cur == nil:
|
if cur == nil:
|
||||||
|
|
@ -345,10 +345,10 @@ proc raiseExceptionAux(e: ref Exception) =
|
||||||
quitOrDebug()
|
quitOrDebug()
|
||||||
else:
|
else:
|
||||||
pushCurrentException(e)
|
pushCurrentException(e)
|
||||||
raise_counter.inc
|
raiseCounter.inc
|
||||||
if raise_counter == 0:
|
if raiseCounter == 0:
|
||||||
raise_counter.inc # skip zero at overflow
|
raiseCounter.inc # skip zero at overflow
|
||||||
e.raise_id = raise_counter
|
e.raiseId = raiseCounter
|
||||||
{.emit: "`e`->raise();".}
|
{.emit: "`e`->raise();".}
|
||||||
else:
|
else:
|
||||||
if excHandler != nil:
|
if excHandler != nil:
|
||||||
|
|
@ -382,7 +382,7 @@ proc raiseExceptionAux(e: ref Exception) =
|
||||||
var buf: array[0..2000, char]
|
var buf: array[0..2000, char]
|
||||||
var L = 0
|
var L = 0
|
||||||
if e.trace.len != 0:
|
if e.trace.len != 0:
|
||||||
add(buf, $e.trace) # gc allocation
|
add(buf, $e.trace) # gc allocation
|
||||||
add(buf, "Error: unhandled exception: ")
|
add(buf, "Error: unhandled exception: ")
|
||||||
add(buf, e.msg)
|
add(buf, e.msg)
|
||||||
add(buf, " [")
|
add(buf, " [")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue