You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/09/13 07:41:19 UTC
[GitHub] jthomas closed pull request #138: protect against lack of
Error.captureStackTrace
jthomas closed pull request #138: protect against lack of Error.captureStackTrace
URL: https://github.com/apache/incubator-openwhisk-client-js/pull/138
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/lib/openwhisk_error.js b/lib/openwhisk_error.js
index 6780726..1bc68f6 100644
--- a/lib/openwhisk_error.js
+++ b/lib/openwhisk_error.js
@@ -4,7 +4,10 @@
'use strict'
module.exports = function OpenWhiskError (message, error, statusCode) {
- Error.captureStackTrace(this, this.constructor)
+ if (Error.captureStackTrace) {
+ // this function is not defined in some browsers, notably Firefox
+ Error.captureStackTrace(this, this.constructor)
+ }
this.name = this.constructor.name
this.message = message
this.error = error
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services