refactor: normalize error logging (#7370)

This commit is contained in:
Joshua Chen 2022-05-08 13:40:34 +08:00 committed by GitHub
parent 87c7639a52
commit 7c9892888d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 27 additions and 30 deletions

View file

@ -64,9 +64,9 @@ export async function cliDocsVersionCommand(
try {
validateVersionName(version);
} catch (e) {
} catch (err) {
logger.info`${pluginIdLogPrefix}: Invalid version name provided. Try something like: 1.0.0`;
throw e;
throw err;
}
// Load existing versions.