[Pkg-javascript-commits] [node-asn1.js] 160/202: repoter: check for captureStackTrace before

Bastien Roucariès rouca at moszumanska.debian.org
Thu Apr 20 19:19:04 UTC 2017


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

rouca pushed a commit to branch master
in repository node-asn1.js.

commit 180508f22cfb864eb0ae8f59fcbb164afa5a7795
Author: Felix Hanley <felix at userspace.com.au>
Date:   Mon May 16 14:55:26 2016 +1000

    repoter: check for captureStackTrace before
    
    `Error.captureStackTrace` is available only in V8.
---
 lib/asn1/base/reporter.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/asn1/base/reporter.js b/lib/asn1/base/reporter.js
index e0a8e89..76f6045 100644
--- a/lib/asn1/base/reporter.js
+++ b/lib/asn1/base/reporter.js
@@ -96,7 +96,8 @@ inherits(ReporterError, Error);
 
 ReporterError.prototype.rethrow = function rethrow(msg) {
   this.message = msg + ' at: ' + (this.path || '(shallow)');
-  Error.captureStackTrace(this, ReporterError);
+  if (Error.captureStackTrace)
+    Error.captureStackTrace(this, ReporterError);
 
   return this;
 };

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



More information about the Pkg-javascript-commits mailing list