mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
build(store): build26 from 45504a2b
This commit is contained in:
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
//#region src/core/errors.ts
|
||||
var StoreError = class extends Error {
|
||||
code;
|
||||
cause;
|
||||
constructor(code, options) {
|
||||
super(options?.message ?? code);
|
||||
this.name = "StoreError";
|
||||
this.code = code;
|
||||
this.cause = options?.cause;
|
||||
}
|
||||
};
|
||||
function isStoreError(error) {
|
||||
return error instanceof StoreError;
|
||||
}
|
||||
function throwNoTargetError() {
|
||||
throw new StoreError("NO_TARGET");
|
||||
}
|
||||
function throwDestroyedError() {
|
||||
throw new StoreError("DESTROYED");
|
||||
}
|
||||
//#endregion
|
||||
export { StoreError, isStoreError, throwDestroyedError, throwNoTargetError };
|
||||
|
||||
//# sourceMappingURL=errors.js.map
|
||||
Reference in New Issue
Block a user