node-cooper - v0.2.0
    Preparing search index...

    Class CooperError

    The pipeline stage that produced an error. Identical to the Elixir implementation's :stage atoms, so an error reads the same in both.

    Hierarchy

    • Error
      • CooperError
    Index
    • Parameters

      • message: string
      • Optionaldetails: {
            cause?: unknown;
            column?: number;
            file?: string;
            line?: number;
            offset?: number;
            stage?: Stage;
        } = {}

      Returns export=

    column: number | undefined

    1-based column of a lexer/parser error.

    file: string | undefined

    The file the error was raised in, when the source has one.

    line: number | undefined

    1-based line of a lexer/parser error.

    name: string
    offset: number | undefined

    0-based offset (UTF-16 code units) of a lexer/parser error.

    stage: Stage
    • Wraps any thrown value into a CooperError, passing an existing one through untouched, so callers only ever have one error type to catch.

      Parameters

      • err: unknown
      • stage: Stage

      Returns export=