UNPKG

@microsoft/sp-webpart-base

Version:

SharePoint Framework support for building web parts

65 lines 1.94 kB
/** * WellKnown error codes used by the SharePoint client webpart framework. */ import { SPError } from '@microsoft/sp-core-library'; export declare enum SPWebPartErrorCode { ModuleUndefined = 0, ModuleNotLoaded = 1, IncorrectBoostrapModule = 2, MissingExpectedWebPartMemberError = 3, NonBaseWebPart = 4, ScriptLoadError = 5, ManifestDownloadFailed = 6, ManifestNull = 7, ManifestInvalid = 8, BaseConstructError = 9, MustOverrideRender = 10, NotInitializedError = 11, PropertyBagNull = 12, OnAfterDeserializeReturnedNull = 13, OnInitReturnedNullPromise = 14, ReadOnlyProperty = 15, SerializationFailed = 16, FirstTimeRenderCalledMoreThanOnce = 17, RenderCompletedCallNotCalled = 18, InvalidSPLinkAttributeFormat = 19, InvalidSPLinkIndex = 20, GetDataReturnedNullPromise = 21, RenderPromiseUndefined = 22, RenderTimeout = 23, TranspileNotImplemented = 24 } /** * Web part errors. * * @internal */ export declare class SPWebPartError extends SPError { /** * Error id to string map */ private static _errorCodeToMessageMap; /** * Error id. */ private _id; get id(): number; /** * Returns 'SPWebPartErrorCode'. */ get category(): string; static create(errorCode: SPWebPartErrorCode | string | undefined, ...params: any[]): SPWebPartError; static createWithLogProperties(errorCode: SPWebPartErrorCode, logProperties: { [key: string]: any; }, ...params: any[]): SPWebPartError; /** * Constructor for the SPWebPartError class. * * @param errorCode - a numeric error code of type SPWebPartErrorCode. * @param logProperties - (optional) additional properties that can be used to troubleshoot rare to repro bugs. * @param params - Error message params. * */ private constructor(); } //# sourceMappingURL=SPWebPartError.d.ts.map