summaryrefslogtreecommitdiff
path: root/src/misc/errors.ts
diff options
context:
space:
mode:
authorHaishan <[email protected]>2022-06-05 23:40:25 +0800
committerHaishan <[email protected]>2022-06-05 23:40:25 +0800
commit6a402afa3f16b8cc00a939b72250b5aaabaf5b7d (patch)
treeefe062a5847c6ef950d56aef3165842f829de119 /src/misc/errors.ts
parentdadca39e95c17d9c6182038e659f1a07ff71c55c (diff)
Fix theme switcher button shape on iOS
Diffstat (limited to 'src/misc/errors.ts')
-rw-r--r--src/misc/errors.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/misc/errors.ts b/src/misc/errors.ts
index 1bc369a..ec12b6a 100644
--- a/src/misc/errors.ts
+++ b/src/misc/errors.ts
@@ -1,5 +1,12 @@
export const DOES_NOT_SUPPORT_FETCH = 0;
+export class YacdError extends Error {
+ constructor(public message: string, public code?: string | number) {
+ super(message);
+ Error.captureStackTrace(this, this.constructor);
+ }
+}
+
export const errors = {
[DOES_NOT_SUPPORT_FETCH]: {
message: 'Browser not supported!',