error.mjs 517 B

12345678910111213141516171819202122
  1. import { isString } from "./types.mjs";
  2. //#region ../../packages/utils/error.ts
  3. var ElementPlusError = class extends Error {
  4. constructor(m) {
  5. super(m);
  6. this.name = "ElementPlusError";
  7. }
  8. };
  9. function throwError(scope, m) {
  10. throw new ElementPlusError(`[${scope}] ${m}`);
  11. }
  12. function debugWarn(scope, message) {
  13. {
  14. const error = isString(scope) ? new ElementPlusError(`[${scope}] ${message}`) : scope;
  15. console.warn(error);
  16. }
  17. }
  18. //#endregion
  19. export { debugWarn, throwError };
  20. //# sourceMappingURL=error.mjs.map