Skip to content

Commit

Permalink
chore: enhance error message
Browse files Browse the repository at this point in the history
  • Loading branch information
junghyeonsu committed Oct 27, 2023
1 parent 2a9f424 commit 3cfbfa1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-turtles-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@icona/generator": patch
---

Enhance error message
4 changes: 3 additions & 1 deletion packages/icona-generator/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export const generate = ({
config,
}: GenerateFunction) => {
if (!icons) {
throw new Error("There is no icons data");
throw new Error(
"[@Icona/generator] There is no `icons.json` file in .icona folder",
);
}

const { generate: fn } = generator(icons, config);
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/icona-cli/src/core/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const generate = (config: IconaConfig) => {
const icons = getIconaIconsFile();

if (!icons) {
console.log("No icons.json file found");
console.log("[@Icona/generator] No icons.json file found");
return;
}

Expand Down

0 comments on commit 3cfbfa1

Please sign in to comment.