From 76d63ec4e0f02b7bb91aefb9eb6959198322f42b Mon Sep 17 00:00:00 2001 From: Vincent Serpoul Date: Tue, 6 Sep 2016 11:20:22 +0800 Subject: Error message more helpful --- app/scripts/lib/inpage-provider.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index 3b7d76c7d..e22e5e411 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -80,7 +80,8 @@ MetamaskInpageProvider.prototype.send = function (payload) { // throw not-supported Error default: - var message = 'The MetaMask Web3 object does not support synchronous methods. See https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#all-async---think-of-metamask-as-a-light-client for details.' + var message = 'The MetaMask Web3 object does not support synchronous methods like '+ payload.method + + '. See https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#all-async---think-of-metamask-as-a-light-client for details.' throw new Error(message) } @@ -131,4 +132,4 @@ function eachJsonMessage(payload, transformFn){ } else { return transformFn(payload) } -} \ No newline at end of file +} -- cgit v1.2.3 From 4cf12337f2d3ad97a670ddbdc131435415f9626b Mon Sep 17 00:00:00 2001 From: Vincent Serpoul Date: Tue, 6 Sep 2016 11:24:09 +0800 Subject: linting --- app/scripts/lib/inpage-provider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/scripts/lib/inpage-provider.js b/app/scripts/lib/inpage-provider.js index e22e5e411..4f9fa1a7d 100644 --- a/app/scripts/lib/inpage-provider.js +++ b/app/scripts/lib/inpage-provider.js @@ -80,7 +80,7 @@ MetamaskInpageProvider.prototype.send = function (payload) { // throw not-supported Error default: - var message = 'The MetaMask Web3 object does not support synchronous methods like '+ payload.method + + var message = 'The MetaMask Web3 object does not support synchronous methods like ' + payload.method + '. See https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#all-async---think-of-metamask-as-a-light-client for details.' throw new Error(message) -- cgit v1.2.3