Skip to content

Commit

Permalink
Improved error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaid committed Jan 31, 2019
1 parent c1fe92d commit 94585e7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ export default class {
])

const jsdocJobs = [htmlConfigPath, tsdConfigPath].map(configPath => exec(`node "${jsdocPath}" --configure "${configPath}"`))
await Promise.all(jsdocJobs)

const jsdocResults = await Promise.all(jsdocJobs)

for (const jsdocResult of jsdocResults) {
if (jsdocResult.stderr) {
throw new Error(`JSDoc failed: ${jsdocResult.stderr}`)
}
}

if (this.options.autoTsdOutputFile) {
const tsdContent = fs.readFileSync(this.options.autoTsdOutputFile)
Expand Down

0 comments on commit 94585e7

Please sign in to comment.