errorhandling

Source   Edit  

This module contains support code for new-styled error handling via an nkError node kind.

Types

ErrorKind = enum
  RawTypeMismatchError, ExpressionCannotBeCalled, CustomError,
  WrongNumberOfArguments, AmbiguousCall
expand as you need. Source   Edit  

Procs

proc errorSubNode(n: PNode): PNode {....raises: [], tags: [], forbids: [].}
Source   Edit  
proc errorToString(config: ConfigRef; n: PNode): string {.
    ...raises: [ValueError, Exception, KeyError],
    tags: [RootEffect, ReadDirEffect], forbids: [].}
Source   Edit  
proc newError(wrongNode: PNode; k: ErrorKind; args: varargs[PNode]): PNode {.
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc newError(wrongNode: PNode; msg: string): PNode {....raises: [], tags: [],
    forbids: [].}
Source   Edit