@itwin/presentation-common
Version:
Common pieces for iModel.js presentation packages
50 lines • 1.84 kB
TypeScript
/** @packageDocumentation
* @module Core
*/
import { BentleyError, GetMetaDataFunction } from "@itwin/core-bentley";
/**
* Status codes used by Presentation APIs.
* @public
*/
export declare enum PresentationStatus {
/** Success result. */
Success = 0,
/** Request was cancelled. */
Canceled = 1,
/** Error: Unknown */
Error = 65536,
/** Error: Backend is not initialized. */
NotInitialized = 65537,
/** Error: Result set is too large. */
ResultSetTooLarge = 65538,
/** Error: Argument is invalid. */
InvalidArgument = 65539,
/**
* Timeout for the request was reached which prevented it from being fulfilled. Frontend may
* repeat the request.
*
* @deprecated in 5.0 - will not be removed until after 2026-06-13. Presentation RPC now relies on `RpcPendingResponse` to handle timeouts.
*/
BackendTimeout = 65543
}
/**
* An error type thrown by Presentation APIs.
* @public
*/
export declare class PresentationError extends BentleyError {
/**
* Creates an instance of Error.
* @param errorNumber Error code
* @param message Optional brief description of the error. The `message` property combined with the `name`
* property is used by the `Error.prototype.toString()` method to create a string representation of the Error.
* @param log Optional log function which logs the error.
* @param getMetaData Optional function that returns meta-data related to an error.
*/
constructor(errorNumber: PresentationStatus, message?: string, getMetaData?: GetMetaDataFunction);
/**
* Returns the name of each error status. The name is used by the `Error.prototype.toString()`
* method to create a string representation of the error.
*/
protected _initName(): string;
}
//# sourceMappingURL=Error.d.ts.map