# errorhandling

Theme:

- Index

Search:
Group by:
Source Edit

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

# Imports

ast, renderer, options, types

# 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, OSError],
        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