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
  58695917_d541_3cf4_3c19_99e8ec777233["constructor()"]
  5f16ef10_b311_e9a4_8af8_637aade85f1e["RegistryInvalidNamespaceError"]
  58695917_d541_3cf4_3c19_99e8ec777233 -->|defined in| 5f16ef10_b311_e9a4_8af8_637aade85f1e
  style 58695917_d541_3cf4_3c19_99e8ec777233 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/shadcn/src/registry/errors.ts lines 241–251

  constructor(public readonly name: string) {
    const message = `Invalid registry namespace: "${name}". Registry names must start with @ (e.g., @shadcn, @v0).`

    super(message, {
      code: RegistryErrorCode.VALIDATION_ERROR,
      context: { name },
      suggestion:
        "Use a valid registry name starting with @ or provide a direct URL to the registry.",
    })
    this.name = "RegistryInvalidNamespaceError"
  }

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 241.

Analyze Your Own Codebase

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

Try Supermodel Free