init commit
This commit is contained in:
25
server/api/myError.ts
Executable file
25
server/api/myError.ts
Executable file
@@ -0,0 +1,25 @@
|
||||
import { cli } from "winston/lib/winston/config";
|
||||
|
||||
export default class myError extends Error {
|
||||
messageEnglish: string;
|
||||
statusCode: Number;
|
||||
clientCode: Number;
|
||||
clientMessage: string;
|
||||
title: string;
|
||||
|
||||
constructor(
|
||||
messageEnglish ?: string,
|
||||
statusCode?: Number,
|
||||
clientCode?: Number,
|
||||
clientMessage?: string,
|
||||
title?: string
|
||||
) {
|
||||
super(messageEnglish);
|
||||
this.messageEnglish = messageEnglish;
|
||||
this.statusCode = statusCode;
|
||||
this.clientCode = clientCode;
|
||||
this.clientMessage = clientMessage;
|
||||
this.title = title;
|
||||
Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user