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

    Variable ErrorsConst

    Errors: {
        GeoLeafError: typeof GeoLeafError;
        ValidationError: typeof ValidationError;
        SecurityError: typeof SecurityError;
        ConfigError: typeof ConfigError;
        NetworkError: typeof NetworkError;
        InitializationError: typeof InitializationError;
        MapError: typeof MapError;
        DataError: typeof DataError;
        POIError: typeof POIError;
        RouteError: typeof RouteError;
        UIError: typeof UIError;
        normalizeError: (error: unknown, defaultMessage?: string) => GeoLeafError;
        isErrorType: (error: unknown, ErrorClass: typeof GeoLeafError) => boolean;
        getErrorCode: (error: unknown) => string;
        createError: (
            ErrorClass: ErrorClassConstructor,
            message: string,
            context?: ErrorContext,
        ) => GeoLeafError;
        createErrorByType: (
            type: string,
            message: string,
            context?: ErrorContext,
        ) => GeoLeafError;
        sanitizeErrorMessage: (message: unknown, maxLength?: number) => string;
        safeErrorHandler: (
            handler: ((err: unknown) => void) | undefined,
            error: unknown,
        ) => void;
        ErrorCodes: Readonly<
            {
                VALIDATION: "VALIDATION_ERROR";
                SECURITY: "SECURITY_ERROR";
                CONFIG: "CONFIG_ERROR";
                NETWORK: "NETWORK_ERROR";
                INITIALIZATION: "INITIALIZATION_ERROR";
                MAP: "MAP_ERROR";
                DATA: "DATA_ERROR";
                POI: "POI_ERROR";
                ROUTE: "ROUTE_ERROR";
                UI: "UI_ERROR";
            },
        >;
    } = ...

    The GeoLeaf.Errors façade — every error class, the code table and the helpers.

    Mounted on the global namespace by globals.core.ts and re-exported by kernel-exports.ts. Its members are the same objects exported individually from this module; the façade exists so integrators can reach them without a deep import.

    Type Declaration

    • GeoLeafError: typeof GeoLeafError
    • ValidationError: typeof ValidationError
    • SecurityError: typeof SecurityError
    • ConfigError: typeof ConfigError
    • NetworkError: typeof NetworkError
    • InitializationError: typeof InitializationError
    • MapError: typeof MapError
    • DataError: typeof DataError
    • POIError: typeof POIError
    • RouteError: typeof RouteError
    • UIError: typeof UIError
    • normalizeError: (error: unknown, defaultMessage?: string) => GeoLeafError
    • isErrorType: (error: unknown, ErrorClass: typeof GeoLeafError) => boolean
    • getErrorCode: (error: unknown) => string
    • createError: (
          ErrorClass: ErrorClassConstructor,
          message: string,
          context?: ErrorContext,
      ) => GeoLeafError
    • createErrorByType: (type: string, message: string, context?: ErrorContext) => GeoLeafError
    • sanitizeErrorMessage: (message: unknown, maxLength?: number) => string
    • safeErrorHandler: (handler: ((err: unknown) => void) | undefined, error: unknown) => void
    • ErrorCodes: Readonly<
          {
              VALIDATION: "VALIDATION_ERROR";
              SECURITY: "SECURITY_ERROR";
              CONFIG: "CONFIG_ERROR";
              NETWORK: "NETWORK_ERROR";
              INITIALIZATION: "INITIALIZATION_ERROR";
              MAP: "MAP_ERROR";
              DATA: "DATA_ERROR";
              POI: "POI_ERROR";
              ROUTE: "ROUTE_ERROR";
              UI: "UI_ERROR";
          },
      >

      The machine-readable code carried by each error subclass, frozen.

      Keys are the short family names; values are the strings that land on error.code. Compare against these rather than against literals, so a rename stays a compile-time concern.

      GeoLeaf.Errors.ErrorCodes.VALIDATION; // 'VALIDATION_ERROR'
      GeoLeaf.Errors.ErrorCodes.SECURITY; // 'SECURITY_ERROR'
      GeoLeaf.Errors.ErrorCodes.CONFIG; // 'CONFIG_ERROR'
      GeoLeaf.Errors.ErrorCodes.NETWORK; // 'NETWORK_ERROR'
      GeoLeaf.Errors.ErrorCodes.INITIALIZATION; // 'INITIALIZATION_ERROR'
      GeoLeaf.Errors.ErrorCodes.MAP; // 'MAP_ERROR'
      GeoLeaf.Errors.ErrorCodes.DATA; // 'DATA_ERROR'
      GeoLeaf.Errors.ErrorCodes.POI; // 'POI_ERROR'
      GeoLeaf.Errors.ErrorCodes.ROUTE; // 'ROUTE_ERROR'
      GeoLeaf.Errors.ErrorCodes.UI; // 'UI_ERROR'