API Reference > bentleyjs-core > Errors > BentleyError > constructor constructor Method Construct a new BentleyError BentleyError(errorNumber: number, message?: string, log?: LogFunction, category?: string, getMetaData?: GetMetaDataFunction): BentleyError Parameter Type Description errorNumber number The required error number originating from one of the standard status enums.See IModelStatus, DbResult, BentleyStatus, BriefcaseStatus, RepositoryStatus, ChangeSetStatus, HttpStatus, WSStatus, IModelHubStatus message string The optional error message (should not be localized). log LogFunction The optional LogFunction that should be used to log this BentleyError. category string The optional logger category to use when logging. getMetaData GetMetaDataFunction Optional data to be passed to the logger. Returns - BentleyError Defined in core/bentley/src/BentleyError.ts Line 406 Last Updated: 11 June, 2024