Generic muse

This commit is contained in:
Endeavorance 2025-04-01 15:43:48 -04:00
parent c66dd4d39c
commit c1166680a8
31 changed files with 412 additions and 2221 deletions

32
src/errors.ts Normal file
View file

@ -0,0 +1,32 @@
export class MuseError extends Error {
fmt(): string {
return this.message;
}
}
export class FileError extends MuseError {
filePath: string;
details?: string;
constructor(message: string, filePath: string, details?: string) {
super(message);
this.filePath = filePath;
this.details = details;
}
fmt(): string {
return `-- ${this.message} --\nFile Path: ${this.filePath}\nDetails: ${this.details}`;
}
}
export class MalformedResourceFileError extends FileError {}
export class FileNotFoundError extends FileError {
constructor(filePath: string) {
super("File not found", filePath);
this.message = "File not found";
this.filePath = filePath;
}
}
export class CLIError extends MuseError {}