import { JRPCErrorInline, JRPCErrorResponseBodyInterface } from "../../interfaces"; import { TypeId } from "../../types"; import { JRPCServerBaseException } from "./jrpc-server-base.exception"; /** * JRPC Exception Abstract * * @abstract * @licence MIT * @author Mahsum UREBE */ export declare abstract class JRPCExceptionAbstract extends JRPCServerBaseException { readonly code: number; readonly data?: any; protected constructor(code: number, message: string, data?: any); /** * Error to Object * * @return {object} */ toObject(): JRPCErrorInline; /** * To response object * @param id * * @return {object} */ toResponseObj(id?: TypeId): JRPCErrorResponseBodyInterface; /** * Error to JSON String * * @return {string} */ toJSON(): string; /** * Stringify error * * @return {string} */ toString(): string; }