Saltearse al contenido

componentRegistry/errors

Esta página aún no está disponible en tu idioma.

Defined in: studiocms/packages/studiocms/src/componentRegistry/errors.ts:56^

Error thrown when a requested component cannot be found in the registry.

This error extends a tagged error type with the tag ‘ComponentNotFoundError’.

throw new ComponentNotFoundError({ componentName: 'MyComponent' });
  • any

new ComponentNotFoundError(): ComponentNotFoundError

ComponentNotFoundError

Data.TaggedError('ComponentNotFoundError')<{
readonly componentName: string;
}>.constructor

Defined in: studiocms/packages/studiocms/src/componentRegistry/errors.ts:17^

Error class representing issues related to the component registry.

This error extends a tagged error type with the tag 'ComponentRegistryError'.

throw new ComponentRegistryError({ message: "Component not found" });
  • any

new ComponentRegistryError(): ComponentRegistryError

ComponentRegistryError

Data.TaggedError('ComponentRegistryError')<{
readonly message: string;
readonly cause?: unknown;
}>.constructor

Defined in: studiocms/packages/studiocms/src/componentRegistry/errors.ts:37^

Error thrown when a file fails to parse.

This error extends a tagged error type with the tag ‘FileParseError’.

throw new FileParseError({ filePath: '/path/to/file', message: 'Invalid format' });
  • any

new FileParseError(): FileParseError

FileParseError

Data.TaggedError('FileParseError')<{
readonly filePath: string;
readonly message: string;
readonly cause?: unknown;
}>.constructor