export class InstanceError extends Error { constructor(public message: string) { super(message); this.name = "InstanceError"; } } export class RuntimeExceptionError extends Error { public code: number = 0; constructor( public message: string, code: number, ) { super(message); this.name = "RuntimeExceptionError"; this.code = code; } } export class IllegalOperationError extends Error { constructor(public message: string) { super(message); this.name = "IllegalOperationError"; } } export class InvalidArgumentType extends Error { public code: number = 1; constructor(public message: string) { super(message); this.name = "InvalidArgumentType"; } } export class ValidationFailedError extends Error { public code: number = 2; constructor(public message: string) { super(message); this.name = "ValidationFailedError"; } }