Skip to content

Commit 284d075

Browse files
Update extract-meta.js
Added file path to the logging when an error occurs upon iterating over the props of components to fetch docs. Also added newline character after file path log statement so the path log is printed on its own line.
1 parent 64ed7fc commit 284d075

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dash/extract-meta.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const isUnionLiteral = typeObj =>
9797

9898
function logError(error, filePath) {
9999
if (filePath) {
100-
process.stderr.write(`Error with path ${filePath}`);
100+
process.stderr.write(`Error with path ${filePath}\n`);
101101
}
102102
process.stderr.write(error + '\n');
103103
if (error instanceof Error) {
@@ -157,7 +157,7 @@ function parseJSX(filepath) {
157157
docstringWarning(doc);
158158
return doc;
159159
} catch (error) {
160-
logError(error);
160+
logError(error, filepath);
161161
}
162162
}
163163

0 commit comments

Comments
 (0)