You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/04/19 23:19:10 UTC

[GitHub] [couchdb] nickva commented on a diff in pull request #4000: Check if toSource() exists before calling it.

nickva commented on code in PR #4000:
URL: https://github.com/apache/couchdb/pull/4000#discussion_r853576861


##########
share/server/dreyfus.js:
##########
@@ -20,7 +20,7 @@ var Dreyfus = (function() {
     } else if (err[0] == "fatal") {
       throw(err);
     }
-    var message = "function raised exception " + err.toSource();
+    var message = "function raised exception " + (err.toSource ? err.toSource() : err.toString());

Review Comment:
   Saw a few other cases use `err.stack`. It might not make much of a difference here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org