aboutsummaryrefslogtreecommitdiff
path: root/packages/server/src/git/error.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/server/src/git/error.ts')
-rw-r--r--packages/server/src/git/error.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/server/src/git/error.ts b/packages/server/src/git/error.ts
index 0429a6c..a07d349 100644
--- a/packages/server/src/git/error.ts
+++ b/packages/server/src/git/error.ts
@@ -42,6 +42,12 @@ export class BlobError extends BaseError {
}
}
+export class MiscError extends BaseError {
+ constructor(code: number, message: string) {
+ super(code, "A misc error has occured: " + message);
+ }
+}
+
type ErrorConstructorType<T> = new (code: number, message: string) => T;
export function createError<E extends BaseError>(ErrorConstructor: ErrorConstructorType<E>, code: number, message: string): E {