Skip to content

Commit

Permalink
Directly throw with the message without logging
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Oct 30, 2022
1 parent 3f433c8 commit 53c4c1a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tool/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,16 @@ program
Redirect.validateLocale(locale, strict);
logger.info(chalk.green(`✓ redirects for ${locale} looking good!`));
} catch (e) {
logger.error(
chalk.red(`_redirects.txt for ${locale} is causing issues: ${e}`)
throw new Error(
`_redirects.txt for ${locale} is causing issues: ${e}`
);
throw new Error("🔥 Errors loading redirects 🔥");
}
}
} else {
try {
Redirect.load(locales, true);
} catch (e) {
logger.error(chalk.red(`Unable to load redirects: ${e}`));
throw new Error("🔥 Errors loading redirects 🔥");
throw new Error(`Unable to load redirects: ${e}`);
}
}

Expand Down

0 comments on commit 53c4c1a

Please sign in to comment.