From 8c4cfc339dbc8836a333e320c9b22d694370b03a Mon Sep 17 00:00:00 2001 From: Yuriy Lazarev Date: Tue, 24 Apr 2018 11:16:48 +0200 Subject: [PATCH] #58 Fix async exceptions handling --- src/Selenium/Builder.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Selenium/Builder.js b/src/Selenium/Builder.js index d97594e..d09a9c1 100644 --- a/src/Selenium/Builder.js +++ b/src/Selenium/Builder.js @@ -13,12 +13,7 @@ exports._newBuilder = function(eb, cb) { exports._build = function(builder) { return function(eb, cb) { - try { - return cb(builder.build()); - } - catch (e) { - return eb(e); - } + builder.build().then(cb, eb); }; };