{"version":3,"file":"error.mjs","sources":["../../src/utils/error.ts"],"sourcesContent":["import { isString } from './types';\r\n\r\nclass ElementPlusError extends Error {\r\n  constructor(m: string) {\r\n    super(m);\r\n    this.name = 'ElementPlusError';\r\n  }\r\n}\r\n\r\nexport function throwError(scope: string, m: string): never {\r\n  throw new ElementPlusError(`[${scope}] ${m}`);\r\n}\r\n\r\nexport function debugWarn(err: Error): void;\r\nexport function debugWarn(scope: string, message: string): void;\r\nexport function debugWarn(scope: string | Error, message?: string): void {\r\n  // if (process.env.NODE_ENV !== 'production') {\r\n  //   const error: Error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;\r\n  //   // eslint-disable-next-line no-console\r\n  //   console.warn(error);\r\n  // }\r\n}\r\n"],"names":[],"mappings":"AAEA,MAAM,yBAAyB,KAAM,CAAA;AAAA,EACnC,YAAY,CAAW,EAAA;AACrB,IAAA,KAAA,CAAM,CAAC,CAAA,CAAA;AACP,IAAA,IAAA,CAAK,IAAO,GAAA,kBAAA,CAAA;AAAA,GACd;AACF,CAAA;AAEgB,SAAA,UAAA,CAAW,OAAe,CAAkB,EAAA;AAC1D,EAAA,MAAM,IAAI,gBAAA,CAAiB,CAAI,CAAA,EAAA,KAAA,CAAA,EAAA,EAAU,CAAG,CAAA,CAAA,CAAA,CAAA;AAC9C,CAAA;AAIgB,SAAA,SAAA,CAAU,OAAuB,OAAwB,EAAA;AAMzE;;;;"}