Home / Class/ AstroUserError Class — astro Architecture

AstroUserError Class — astro Architecture

Architecture documentation for the AstroUserError class in errors.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c79acb1c_5ca9_3fb8_d5f9_b32413b38469["AstroUserError"]
  6040eeed_628d_7649_3de3_370870542dad["errors.ts"]
  c79acb1c_5ca9_3fb8_d5f9_b32413b38469 -->|defined in| 6040eeed_628d_7649_3de3_370870542dad
  68209d7c_914e_c7b5_21e6_f1b2ffd2e39b["constructor()"]
  c79acb1c_5ca9_3fb8_d5f9_b32413b38469 -->|method| 68209d7c_914e_c7b5_21e6_f1b2ffd2e39b
  4dd741f1_9ece_9cde_3d67_8663b0e81344["is()"]
  c79acb1c_5ca9_3fb8_d5f9_b32413b38469 -->|method| 4dd741f1_9ece_9cde_3d67_8663b0e81344

Relationship Graph

Source Code

packages/astro/src/core/errors/errors.ts lines 180–196

export class AstroUserError extends Error {
	type: ErrorTypes = 'AstroUserError';
	/**
	 * A message that explains to the user how they can fix the error.
	 */
	hint: string | undefined;
	name = 'AstroUserError';
	constructor(message: string, hint?: string) {
		super();
		this.message = message;
		this.hint = hint;
	}

	static is(err: unknown): err is AstroUserError {
		return (err as AstroUserError)?.type === 'AstroUserError';
	}
}

Domain

Frequently Asked Questions

What is the AstroUserError class?
AstroUserError is a class in the astro codebase, defined in packages/astro/src/core/errors/errors.ts.
Where is AstroUserError defined?
AstroUserError is defined in packages/astro/src/core/errors/errors.ts at line 180.

Analyze Your Own Codebase

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

Try Supermodel Free