/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module NativeApp
 */
import { ITwinError } from "@itwin/core-bentley";
/**
 * Errors produced by the [[CatalogIModel]] API.
 * @beta
 */
export var CatalogError;
(function (CatalogError) {
    CatalogError.scope = "itwin-Catalog";
    /** Determine whether an error object is a CatalogError */
    function isError(error, key) {
        return ITwinError.isError(error, CatalogError.scope, key);
    }
    CatalogError.isError = isError;
    /** Instantiate and throw a CatalogError */
    function throwError(key, e) {
        ITwinError.throwError({ ...e, iTwinErrorId: { scope: CatalogError.scope, key } });
    }
    CatalogError.throwError = throwError;
})(CatalogError || (CatalogError = {}));
//# sourceMappingURL=CatalogIModel.js.map