import { ICustomError } from "../interface/ICustomError"; import { ErrorType } from "../enum/ErrorType"; import { CustomError } from "../CustomError"; import { AgoraError } from "../AgoraError"; const parseError = require('parse-error'); export class BaseError implements ICustomError { public type!: ErrorType; public title!: string; public message!: string; public datetime!: number; constructor(type: ErrorType, title : string, message: string){ this.type = type; this.title = title; this.message = message; this.datetime = Date.now(); } public getType(): ErrorType { return this.type; } public setType(value: ErrorType): void { this.type = value; } public getTitle(): string { return this.title; } public setTitle(value: string): void { this.title = value; } public getMessage(): string { return this.message; } public setMessage(value: string): void { this.message = value; } public getDatetime(): number { return this.datetime; } public parseCustomError(error: any): Array{ let customError : Array = []; return customError; } }