diff options
author | Araq <rumpf_a@web.de> | 2018-10-30 15:01:57 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-10-30 15:03:28 +0100 |
commit | 5c25b9389818925ec3697750c6cbcad3bf5c757b (patch) | |
tree | c395de1c155420b953e40972052569a1abd9d1f6 /lib | |
parent | 05964b95e44ee5e41036836d68f263d716c276df (diff) | |
download | Nim-5c25b9389818925ec3697750c6cbcad3bf5c757b.tar.gz |
change system.nim to adhere to the style guide
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system/excpt.nim | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index 20ca143ca..778137668 100644 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -60,7 +60,7 @@ var # list of exception handlers # a global variable for the root of all try blocks currException {.threadvar.}: ref Exception - raise_counter {.threadvar.}: uint + raiseCounter {.threadvar.}: uint gcFramePtr {.threadvar.}: GcFrame @@ -122,12 +122,12 @@ proc popCurrentException {.compilerRtl, inl.} = proc popCurrentExceptionEx(id: uint) {.compilerRtl.} = # 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 else: var cur = currException.up var prev = currException - while cur != nil and cur.raise_id != id: + while cur != nil and cur.raiseId != id: prev = cur cur = cur.up if cur == nil: @@ -345,10 +345,10 @@ proc raiseExceptionAux(e: ref Exception) = quitOrDebug() else: pushCurrentException(e) - raise_counter.inc - if raise_counter == 0: - raise_counter.inc # skip zero at overflow - e.raise_id = raise_counter + raiseCounter.inc + if raiseCounter == 0: + raiseCounter.inc # skip zero at overflow + e.raiseId = raiseCounter {.emit: "`e`->raise();".} else: if excHandler != nil: @@ -382,7 +382,7 @@ proc raiseExceptionAux(e: ref Exception) = var buf: array[0..2000, char] var L = 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, e.msg) add(buf, " [") |