From 639996475c29efd1240b6a835d3c1fb3acc2a258 Mon Sep 17 00:00:00 2001 From: Alex J Burke Date: Thu, 2 Jan 2020 17:16:46 +0100 Subject: [PATCH] Remove duplicate catch block made redundant via await. --- lib/evaluateSnippets.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/evaluateSnippets.js b/lib/evaluateSnippets.js index 8ee3863..4b004b2 100644 --- a/lib/evaluateSnippets.js +++ b/lib/evaluateSnippets.js @@ -113,16 +113,7 @@ module.exports = async function(snippets, options) { ); } - try { - await promise; - } catch (e) { - snippet.htmlErrorMessage = getErrorMessage( - global.expect, - 'html', - e - ); - snippet.errorMessage = getErrorMessage(global.expect, 'text', e); - } + await promise; } else { vm.runInThisContext( hasBabel ? snippet.code : transpile(snippet.code)