mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 21:47:01 +02:00
refactor: normalize error logging (#7370)
This commit is contained in:
parent
87c7639a52
commit
7c9892888d
10 changed files with 27 additions and 30 deletions
|
@ -18,6 +18,7 @@ import type {
|
|||
BlogPost,
|
||||
} from '@docusaurus/plugin-content-blog';
|
||||
import {blogPostContainerID} from '@docusaurus/utils-common';
|
||||
import logger from '@docusaurus/logger';
|
||||
|
||||
async function generateBlogFeed({
|
||||
blogPosts,
|
||||
|
@ -127,7 +128,8 @@ async function createBlogFeedFile({
|
|||
try {
|
||||
await fs.outputFile(path.join(generatePath, feedPath), feedContent);
|
||||
} catch (err) {
|
||||
throw new Error(`Generating ${feedType} feed failed: ${err}.`);
|
||||
logger.error(`Generating ${feedType} feed failed.`);
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue