Improve error handling and code structure
This commit is contained in:
parent
f35342a791
commit
8d4779b8fe
5 changed files with 116 additions and 67 deletions
12
src/errors.ts
Normal file
12
src/errors.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
export class SyncIDNotFoundError extends Error {
|
||||
readonly fileID: string;
|
||||
|
||||
constructor(fileID: string) {
|
||||
super(`SyncID not found for file ${fileID}`);
|
||||
this.fileID = fileID;
|
||||
Object.setPrototypeOf(this, new.target.prototype);
|
||||
}
|
||||
}
|
||||
|
||||
export class UnchangedProtyleError extends Error {}
|
Loading…
Add table
Add a link
Reference in a new issue