/**
 * 路由错误类型定义
 */ "use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get RouterError () {
        return RouterError;
    },
    get RouterErrorCode () {
        return RouterErrorCode;
    },
    get createRouterError () {
        return createRouterError;
    }
});
const _errors = require("../../../utils/errors");
var RouterErrorCode = /*#__PURE__*/ function(RouterErrorCode) {
    /**
   * 路由未初始化
   */ RouterErrorCode["ROUTER_NOT_INITIALIZED"] = "ROUTER_NOT_INITIALIZED";
    /**
   * 路由配置错误
   */ RouterErrorCode["ROUTER_CONFIG_ERROR"] = "ROUTER_CONFIG_ERROR";
    /**
   * 路由未找到
   */ RouterErrorCode["ROUTE_NOT_FOUND"] = "ROUTE_NOT_FOUND";
    /**
   * 路由导航失败
   */ RouterErrorCode["ROUTE_NAVIGATION_FAILED"] = "ROUTE_NAVIGATION_FAILED";
    /**
   * 路由权限不足
   */ RouterErrorCode["ROUTE_PERMISSION_DENIED"] = "ROUTE_PERMISSION_DENIED";
    /**
   * 路由组件加载失败
   */ RouterErrorCode["ROUTE_COMPONENT_LOAD_FAILED"] = "ROUTE_COMPONENT_LOAD_FAILED";
    /**
   * 路由转换失败
   */ RouterErrorCode["ROUTE_TRANSFORM_FAILED"] = "ROUTE_TRANSFORM_FAILED";
    return RouterErrorCode;
}({});
let RouterError = class RouterError extends _errors.FrameworkError {
    constructor(message, code, severity = _errors.ErrorSeverity.MEDIUM, cause, context){
        super(message, _errors.ErrorType.RUNTIME, severity, {
            code,
            originalError: cause,
            context: context || {}
        });
        this.name = 'RouterError';
    }
};
function createRouterError(message, code, severity, cause, context) {
    return new RouterError(message, code, severity, cause, context);
}

//# sourceMappingURL=RouterError.js.map