Trails Packages
    Preparing search index...

    A custom error class that enforces the use of error ids.

    An error must be constructed from a (computer-readable) id and a human readable informational text. An optional cause option can be passed to indicate the nested reason for an error.

    Conventions

    Error ids should be scoped to a package to avoid conflicts. Each package should pick a sensible namespace prefix.

    An example for a good error id is runtime:dependency-cycle.

    Hierarchy

    • GlobalError
      • Error
    Index

    Constructors

    Properties

    Constructors

    • Parameters

      • id: string
      • text: string
      • Optionaloptions: { cause?: unknown }

      Returns Error

    Properties

    id: string

    Unique error id

    text: string

    Human readable error message