{"version":3,"file":"error.mjs","sources":["../../../../../packages/utils/error.ts"],"sourcesContent":["/**\n * @description 错误类\n */\nclass ElementPlusError extends Error {\n  constructor(msg: string) {\n    super(msg)\n    // eslint-disable-next-line unicorn/custom-error-definition\n    this.name = 'GangwError'\n  }\n}\n/**\n * @description 错误抛出机制\n * @param { String } scope\n * @param { String} msg\n */\nexport function throwError(scope: string, msg: string) {\n  throw new ElementPlusError(`[${scope}] ${msg}`)\n}\n/**\n * @description 断点警告\n * @param { String } scope\n * @param { String } message\n */\nexport function debugWarn(scope: string, message: string) {\n  if (process.env.NODE_ENV !== 'production') {\n    // eslint-disable-next-line no-console\n    console.warn(new ElementPlusError(`[${scope}] ${message}`))\n  }\n}\n"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,SAAS,KAAK,CAAC;AACrC,EAAE,WAAW,CAAC,GAAG,EAAE;AACnB,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC;AACf,IAAI,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;AAC7B,GAAG;AACH,CAAC;AACM,SAAS,UAAU,CAAC,KAAK,EAAE,GAAG,EAAE;AACvC,EAAE,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AACM,SAAS,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE;AAC1C,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;AAC7C,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAChE,GAAG;AACH;;;;"}