Created
January 23, 2016 17:18
-
-
Save barkthins/80780c5274e991433408 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/web3/lib/web3/httpprovider.js b/node_modules/web3/lib/web3/httpprovider.js | |
index aafa5b6..f2770c6 100644 | |
--- a/node_modules/web3/lib/web3/httpprovider.js | |
+++ b/node_modules/web3/lib/web3/httpprovider.js | |
@@ -76,6 +76,7 @@ HttpProvider.prototype.send = function (payload) { | |
try { | |
request.send(JSON.stringify(payload)); | |
} catch(error) { | |
+ console.error(error); | |
throw errors.InvalidConnection(this.host); | |
} | |
@@ -84,6 +85,7 @@ HttpProvider.prototype.send = function (payload) { | |
try { | |
result = JSON.parse(result); | |
} catch(e) { | |
+ console.error(e); | |
throw errors.InvalidResponse(request.responseText); | |
} | |
@@ -108,6 +110,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) { | |
try { | |
result = JSON.parse(result); | |
} catch(e) { | |
+ console.error(e); | |
error = errors.InvalidResponse(request.responseText); | |
} | |
@@ -118,6 +121,7 @@ HttpProvider.prototype.sendAsync = function (payload, callback) { | |
try { | |
request.send(JSON.stringify(payload)); | |
} catch(error) { | |
+ console.error(error); | |
callback(errors.InvalidConnection(this.host)); | |
} | |
}; | |
@@ -138,6 +142,7 @@ HttpProvider.prototype.isConnected = function() { | |
}); | |
return true; | |
} catch(e) { | |
+ console.error(e); | |
return false; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment