From 4179376ee273dfe05962100c3957a82d11d888f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s?= Date: Mon, 23 Mar 2020 17:04:11 +0100 Subject: [PATCH] Remove unnecessary try/catch --- bin/api-docs/update-api-docs.js | 37 ++++++++++----------------------- 1 file changed, 11 insertions(+), 26 deletions(-) diff --git a/bin/api-docs/update-api-docs.js b/bin/api-docs/update-api-docs.js index 4af1d919859e91..5ad1263401bde4 100755 --- a/bin/api-docs/update-api-docs.js +++ b/bin/api-docs/update-api-docs.js @@ -203,31 +203,16 @@ glob.stream( [ // so the tokens must be replaced in sequence to prevent the processes // from overriding each other. for ( const [ token, path ] of tokens ) { - try { - await execa( - join( - __dirname, - '..', - '..', - 'node_modules', - '.bin', - 'docgen' - ), - [ - relative( ROOT_DIR, resolve( dirname( file ), path ) ), - `--output ${ output }`, - '--to-token', - `--use-token "${ token }"`, - '--ignore "/unstable|experimental/i"', - ], - { shell: true } - ); - } catch ( error ) { - // Disable reason: Errors should log to console. - - // eslint-disable-next-line no-console - console.error( error ); - process.exit( 1 ); - } + await execa( + join( __dirname, '..', '..', 'node_modules', '.bin', 'docgen' ), + [ + relative( ROOT_DIR, resolve( dirname( file ), path ) ), + `--output ${ output }`, + '--to-token', + `--use-token "${ token }"`, + '--ignore "/unstable|experimental/i"', + ], + { shell: true } + ); } } );