Home / Function/ constructor() — ui Function Reference

constructor() — ui Function Reference

Architecture documentation for the constructor() function in errors.ts from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  708b4cb9_3f04_b3b8_15bf_8125b8b94e7f["constructor()"]
  53d51513_ba60_4913_ad40_e71dbff664e7["RegistryMissingEnvironmentVariablesError"]
  708b4cb9_3f04_b3b8_15bf_8125b8b94e7f -->|defined in| 53d51513_ba60_4913_ad40_e71dbff664e7
  style 708b4cb9_3f04_b3b8_15bf_8125b8b94e7f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/registry/errors.ts lines 222–237

  constructor(
    public readonly registryName: string,
    public readonly missingVars: string[]
  ) {
    const message =
      `Registry "${registryName}" requires the following environment variables:\n\n` +
      missingVars.map((v) => `  • ${v}`).join("\n")

    super(message, {
      code: RegistryErrorCode.MISSING_ENV_VARS,
      context: { registryName, missingVars },
      suggestion:
        "Set the required environment variables to your .env or .env.local file.",
    })
    this.name = "RegistryMissingEnvironmentVariablesError"
  }

Subdomains

Frequently Asked Questions

What does constructor() do?
constructor() is a function in the ui codebase, defined in packages/shadcn/src/registry/errors.ts.
Where is constructor() defined?
constructor() is defined in packages/shadcn/src/registry/errors.ts at line 222.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free