/// import { inspect } from 'util'; /** * Overridden Error class for the documentation. * * @ignore */ declare class Error { /** * @ignore * * @param message The message */ constructor(message?: string); /** * The name of this error. This is usually equal to the class name of the error. */ readonly name: string; /** * The message of this error. */ readonly message: string; /** * The stack of this error. */ readonly stack?: string; } /** * The base class for every Error. * This class should never be directly created or thrown. */ export declare class GenericError extends Error { private readonly code; private readonly cause; /** * Creates a new instance with an optional message. * * @param msg An optional message for this error */ constructor(msg?: string); /** * Sets the cause of this error. * * @param cause Another Error to be set as cause * * @returns The current error for method chaining */ setCause(cause: Error): this; /** * Returns the cause of this error. * * @returns The cause of this error */ getCause(): Error; /** * Sets the code of this error. * * @param code A code to be set * * @returns The current error for method chaining */ setCode(code: number): this; /** * Returns the code of this error. * * @returns The code of this error */ getCode(): number; /** * Whether this error has a code or not. * * @returns true if this error has a code, false if otherwise */ hasCode(): boolean; /** * Returns the full stack of this error. * This also includes the cause of this error and all further causes. * * @returns The full stack of this error */ getFullStack(): string; /** * Custom inspect function for proper formatting with simple console.log statements. * * @ignore * * @returns The full stack of this error */ [inspect.custom](): string; /** * Defines a non-writable and non-enumerable property on this error. * This function can be used by subclasses to easily attach properties. * * @param propertyKey The property key of the property to define * @param value The value for the property */ protected __define(propertyKey: string, value: any): void; } export {};