Add extending by binding
This commit is contained in:
parent
beff321251
commit
49e82d0a13
12 changed files with 155 additions and 102 deletions
|
@ -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 { }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue