[Pkg-javascript-commits] [node-stream-http] 32/208: Remove extraneous try/catch

Bastien Roucariès rouca at moszumanska.debian.org
Sun Aug 13 13:39:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-stream-http.

commit 333d07b500c4035d48d7ae8cbc34ef7d5cc2d729
Author: John Hiesey <john at hiesey.com>
Date:   Tue Jul 7 19:25:25 2015 -0700

    Remove extraneous try/catch
---
 lib/request.js | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/lib/request.js b/lib/request.js
index 6ab69b1..81befab 100644
--- a/lib/request.js
+++ b/lib/request.js
@@ -88,15 +88,11 @@ ClientRequest.prototype._onFinish = function () {
 	var body
 	if (opts.method === 'POST' || opts.method === 'PUT') {
 		if (capability.blobConstructor) {
-			try {
-				body = new window.Blob(self._body.map(function (buffer) {
-					return buffer.toArrayBuffer()
-				}), {
-					type: (headersObj['content-type'] || {}).value || ''
-				})
-			} catch (e) {
-				alert(e.message)
-			}
+			body = new window.Blob(self._body.map(function (buffer) {
+				return buffer.toArrayBuffer()
+			}), {
+				type: (headersObj['content-type'] || {}).value || ''
+			})
 		} else {
 			// get utf8 string
 			body = Buffer.concat(self._body).toString()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-stream-http.git



More information about the Pkg-javascript-commits mailing list