icon.error.mjs 3.2 KB

123456789101112131415161718192021
  1. import { error, ANT_ICON_ANGULAR_CONSOLE_PREFIX } from '../utils';
  2. export function NameSpaceIsNotSpecifyError() {
  3. return new Error(`${ANT_ICON_ANGULAR_CONSOLE_PREFIX}Type should have a namespace. Try "namespace:${name}".`);
  4. }
  5. export function IconNotFoundError(icon) {
  6. return new Error(`${ANT_ICON_ANGULAR_CONSOLE_PREFIX}the icon ${icon} does not exist or is not registered.`);
  7. }
  8. export function HttpModuleNotImport() {
  9. error(`you need to import "HttpClientModule" to use dynamic importing.`);
  10. return null;
  11. }
  12. export function UrlNotSafeError(url) {
  13. return new Error(`${ANT_ICON_ANGULAR_CONSOLE_PREFIX}The url "${url}" is unsafe.`);
  14. }
  15. export function SVGTagNotFoundError() {
  16. return new Error(`${ANT_ICON_ANGULAR_CONSOLE_PREFIX}<svg> tag not found.`);
  17. }
  18. export function DynamicLoadingTimeoutError() {
  19. return new Error(`${ANT_ICON_ANGULAR_CONSOLE_PREFIX}Importing timeout error.`);
  20. }
  21. //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWNvbi5lcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnQvaWNvbi5lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsS0FBSyxFQUFFLCtCQUErQixFQUFFLE1BQU0sVUFBVSxDQUFDO0FBRWxFLE1BQU0sVUFBVSwwQkFBMEI7SUFDeEMsT0FBTyxJQUFJLEtBQUssQ0FBQyxHQUFHLCtCQUErQixnREFBZ0QsSUFBSSxJQUFJLENBQUMsQ0FBQztBQUMvRyxDQUFDO0FBRUQsTUFBTSxVQUFVLGlCQUFpQixDQUFDLElBQVk7SUFDNUMsT0FBTyxJQUFJLEtBQUssQ0FBQyxHQUFHLCtCQUErQixZQUFZLElBQUksdUNBQX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