From fce65099fb8a84b25d8728be59a15f237440cec4 Mon Sep 17 00:00:00 2001 From: Simo Kinnunen Date: Tue, 2 Sep 2014 13:58:21 +0900 Subject: [PATCH] Be more explicit about browser errors. --- lib/units/device/plugins/browser.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/units/device/plugins/browser.js b/lib/units/device/plugins/browser.js index 2b156128..2665b3f8 100644 --- a/lib/units/device/plugins/browser.js +++ b/lib/units/device/plugins/browser.js @@ -91,7 +91,17 @@ module.exports = syrup.serial() ]) }) .catch(function(err) { - log.error('Browser could not be opened', err.stack) + if (message.browser) { + log.error( + 'Failed to open "%s" in "%s"' + , message.url + , message.browser + , err.stack + ) + } + else { + log.error('Failed to open "%s"', message.url, err.stack) + } push.send([ channel , reply.fail() @@ -110,7 +120,7 @@ module.exports = syrup.serial() ]) }) .catch(function(err) { - log.error('Browser could not be cleared', err.stack) + log.error('Failed to clear "%s"', message.browser, err.stack) push.send([ channel , reply.fail()