Home / Class/ MarkdocError Class — astro Architecture

MarkdocError Class — astro Architecture

Architecture documentation for the MarkdocError class in utils.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  de99a190_62cf_d179_9f12_2d3b66dd007c["MarkdocError"]
  c07d581f_3cd8_422f_725f_7e13727235fd["utils.ts"]
  de99a190_62cf_d179_9f12_2d3b66dd007c -->|defined in| c07d581f_3cd8_422f_725f_7e13727235fd
  e106527c_e119_3478_5b8e_e944b7f36494["constructor()"]
  de99a190_62cf_d179_9f12_2d3b66dd007c -->|method| e106527c_e119_3478_5b8e_e944b7f36494

Relationship Graph

Source Code

packages/integrations/markdoc/src/utils.ts lines 7–28

export class MarkdocError extends Error {
	public loc: ErrorLocation | undefined;
	public title: string | undefined;
	public hint: string | undefined;
	public frame: string | undefined;

	type = 'MarkdocError';

	constructor(props: ErrorProperties, ...params: any) {
		super(...params);

		const { title = 'MarkdocError', message, stack, location, hint, frame } = props;

		this.title = title;
		if (message) this.message = message;
		// Only set this if we actually have a stack passed, otherwise uses Error's
		this.stack = stack ? stack : this.stack;
		this.loc = location;
		this.hint = hint;
		this.frame = frame;
	}
}

Domain

Frequently Asked Questions

What is the MarkdocError class?
MarkdocError is a class in the astro codebase, defined in packages/integrations/markdoc/src/utils.ts.
Where is MarkdocError defined?
MarkdocError is defined in packages/integrations/markdoc/src/utils.ts at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free