添加filesystem
This commit is contained in:
24
packages/filesystem/error.ts
Normal file
24
packages/filesystem/error.ts
Normal file
@ -0,0 +1,24 @@
|
||||
// eslint-disable-next-line import/prefer-default-export, max-classes-per-file
|
||||
export class WarpTokenError {
|
||||
error: Error;
|
||||
|
||||
constructor(error: Error) {
|
||||
this.error = error;
|
||||
}
|
||||
}
|
||||
|
||||
export function isWarpTokenError(error: any): error is WarpTokenError {
|
||||
return error instanceof WarpTokenError;
|
||||
}
|
||||
|
||||
export class WarpNetworkError {
|
||||
error: Error;
|
||||
|
||||
constructor(error: Error) {
|
||||
this.error = error;
|
||||
}
|
||||
}
|
||||
|
||||
export function isNetworkError(error: any): error is WarpNetworkError {
|
||||
return error instanceof WarpNetworkError;
|
||||
}
|
Reference in New Issue
Block a user