Utils/utils

Source   Edit  

Types

DictError = object of CatchableError
Source   Edit  
InternalError = object of CatchableError
Source   Edit  
IntError = object of CatchableError
Source   Edit  
InterruptError = object of OSError
Python's is inherited from OSError Source   Edit  
SyntaxError = ref object of CatchableError
  fileName*: string
  lineNo*: int
  colNo*: int
Source   Edit  

Procs

proc noreturnUnreachable(msg = ShouldnotHere) {.noReturn, inline, cdecl,
    ...raises: [], tags: [], forbids: [].}
Source   Edit  

Templates

template `!`[E: CatchableError; T: not void](err: typedesc[E]; e: T): T
Source   Edit  
template `!!`[E: CatchableError](err: typedesc[E]; body): untyped
XXX:NIM-BUG: For expr, DO NOT use !! (use !), nim js may make x = KeyError!!d[k] disappear in produced JS code. Source   Edit  
template raiseSyntaxError(msg: string; fileName: string; lineNo = 0; colNo = 0)
Source   Edit  
template unreachable(msg = ShouldnotHere)
Source   Edit