exception
This commit is contained in:
parent
32f3d7d9f8
commit
db7e318b5b
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue