BentleyError Class

Base exception class for iTwin.js exceptions.

Extends

  • Error

Methods

Name Description
constructor(errorNumber: number, message?: string, metaData?: LoggingMetaData): BentleyError    
_initName(): string Protected This function returns the name of each error status.  
get the meta data associated with this BentleyError, if any.  
getErrorMessage(error: unknown): string Static Use run-time type checking to safely get a useful string summary of an unknown error value, or "" if none exists.  
Use run-time type checking to safely get the metadata with an unknown error value, if possible.  
getErrorProps(error: unknown): ErrorProps Static Returns a new ErrorProps object representing an unknown error value.  
getErrorStack(error: unknown): undefined | string Static Use run-time type checking to safely get the call stack of an unknown error value, if possible.  
get the metadata object associated with an ExceptionMetaData, if any.  

Properties

Name Type Description
errorNumber number    
boolean Returns true if this BentleyError includes (optional) metadata.  

Defined in

Last Updated: 30 November, 2023