Add extending by binding

This commit is contained in:
Endeavorance 2025-03-07 15:01:52 -05:00
parent beff321251
commit 49e82d0a13
12 changed files with 155 additions and 102 deletions

View file

@ -4,7 +4,7 @@ export class MuseError extends Error {
}
}
export class ResourceFileError extends MuseError {
export class FileError extends MuseError {
filePath: string;
details?: string;
@ -18,3 +18,15 @@ export class ResourceFileError extends MuseError {
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 { }