exception

This commit is contained in:
Xu Chang 2022-07-11 18:13:57 +08:00
parent 32f3d7d9f8
commit db7e318b5b
4 changed files with 5 additions and 6 deletions

View File

@ -22,4 +22,4 @@ export declare function makeException(data: {
name: string;
message?: string;
[A: string]: any;
}): import("oak-domain/lib/types").OakException | undefined;
}): import("oak-domain/lib/types").OakException | import("oak-domain/lib/types").OakExternalException | undefined;

View File

@ -24,7 +24,7 @@ class OakDistinguishUserByWechatUserException extends types_1.OakUserException {
}
toString() {
return JSON.stringify({
name: this.name,
name: this.constructor.name,
message: this.message,
userId: this.userId,
});
@ -39,7 +39,7 @@ class OakDistinguishUserByBusinessException extends types_1.OakUserException {
}
toString() {
return JSON.stringify({
name: this.name,
name: this.constructor.name,
message: this.message,
userId: this.userId,
});

View File

@ -42,7 +42,6 @@
"build": "tsc",
"get:area": "ts-node ./scripts/getAmapArea.ts",
"clean:dir": "ts-node ./scripts/cleanDtsAndJs",
"postinstall": "npm run prebuild",
"test": "ts-node ./test/test.ts"
},
"main": "src/index"

View File

@ -20,7 +20,7 @@ export class OakDistinguishUserByWechatUserException extends OakUserException {
toString() {
return JSON.stringify({
name: this.name,
name: this.constructor.name,
message: this.message,
userId: this.userId,
});
@ -36,7 +36,7 @@ export class OakDistinguishUserByBusinessException extends OakUserException {
toString() {
return JSON.stringify({
name: this.name,
name: this.constructor.name,
message: this.message,
userId: this.userId,
});