import { VbsApi } from '../vbs-api'; /** * The global error object. * * @see https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/on-error-statement */ export declare class Err extends VbsApi { /** * Returns or sets a numeric value specifying an error. Number is the Err object's default property. Read/write. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/number-property-visual-basic-for-applications */ Number: number; /** * Returns or sets a string expression containing a descriptive string associated with an object. Read/write. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/description-property-visual-basic-for-applications */ Description: string; /** * Returns or sets a string expression specifying the name of the object or application that originally generated the error. Read/write. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/source-property-visual-basic-for-applications */ Source: string; /** * Returns or sets a string expression containing the context ID for a topic in a Help file. Read/write. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/helpcontext-property-visual-basic-for-applications */ HelpContext: string; /** * Returns or sets a string expression with the fully qualified path to a Help file. Read/write. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/helpfile-property */ HelpFile: string; private doThrow; /** * Generates a run-time error. * @param codeOrError Error to be thrown */ Raise(codeOrError: VbsError): void; /** * Generates a run-time error. * @param code Long integer that identifies the nature of the error. Visual Basic errors (both Visual Basic-defined and user-defined errors) are in the range 0–65535. The range 0–512 is reserved for system errors; the range 513–65535 is available for user-defined errors. * @param source String expression naming the object or application that generated the error. When setting the Source property for an object, use the form project.class. If source is not specified, the programmatic ID of the current Visual Basic project is used. * @param description String expression describing the error. If unspecified, the value in Number is examined. If it can be mapped to a Visual Basic run-time error code, the string that would be returned by the Error function is used as Description. If there is no Visual Basic error corresponding to Number, the "Application-defined or object-defined error" message is used. * @param helpfile The fully qualified path to the Help file in which help on this error can be found. If unspecified, Visual Basic uses the fully qualified drive, path, and file name of the Visual Basic Help file. * @param helpcontext The context ID identifying a topic within helpfile that provides help for the error. If omitted, the Visual Basic Help file context ID for the error corresponding to the Number property is used, if it exists * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/raise-method */ Raise(code: number, source?: string, description?: string, helpfile?: string, helpcontext?: string): void; /** * Clears all property settings of the Err object. * @see https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/clear-method-visual-basic-for-applications */ Clear(): void; OnErrorGoto0(): void; OnErrorResumeNext(): void; valueOf(): number; protected _getPropertyNames(): string[]; } export declare const ERR: Err; export declare class VbsError extends Error { readonly code: number; constructor(message: string, code: number); }