GeoLeaf Core API - v3.0.0
    Preparing search index...

    Base class for every GeoLeaf error — a native Error carrying structured context.

    Beyond message, an instance holds a free-form context bag and an ISO-8601 timestamp set at construction, so a caught error can be logged or serialised without the catch site having to reconstruct where it came from. name is taken from the concrete constructor, which is what makes the subclasses distinguishable after a JSON.stringify.

    ⚠️ code is declared here but only set by the subclasses — an instance of this base class has code === undefined. Use getErrorCode, which falls back to "UNKNOWN_ERROR", rather than reading the field directly.

    const error = new GeoLeaf.Errors.GeoLeafError("Erreur générique", {
    module: "Core",
    operation: "init",
    });

    console.log(error.name); // 'GeoLeafError'
    console.log(error.message); // 'Erreur générique'
    console.log(error.context); // { module: 'Core', operation: 'init' }
    console.log(error.timestamp); // '2026-03-15T10:30:00.000Z'
    console.log(error.code); // undefined (base class)

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    context: ErrorContext
    timestamp: string
    code?: string

    Methods