@visulima/error
Version:
Error with more than just a message, stacktrace parsing.
17 lines (16 loc) • 665 B
TypeScript
import type { ErrorHint, ErrorLocation, ErrorProperties } from "./types.d.ts";
export declare const isVisulimaError: (error: unknown) => error is VisulimaError;
export declare class VisulimaError extends Error {
loc: ErrorLocation | undefined;
title: string | undefined;
/**
* A message that explains to the user how they can fix the error.
*/
hint: ErrorHint | undefined;
type: string;
constructor({ cause, hint, location, message, name, stack, title }: ErrorProperties);
setLocation(location: ErrorLocation): void;
setName(name: string): void;
setMessage(message: string): void;
setHint(hint: ErrorHint): void;
}