This is an automated email from the ASF dual-hosted git repository.

jiangphcn pushed a commit to branch print-stack-sm60
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 9de8e6212eb65f60f382dd5a5ab408787047aa34
Author: jiangph <jian...@cn.ibm.com>
AuthorDate: Fri Sep 18 18:27:44 2020 +0800

    Print stack if name and stack of exception are present
---
 share/server/loop.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/share/server/loop.js b/share/server/loop.js
index 5d77389..f3d9aa5 100644
--- a/share/server/loop.js
+++ b/share/server/loop.js
@@ -130,6 +130,8 @@ var Loop = function() {
     } else if (e.error && e.reason) {
       // compatibility with old error format
       respond(["error", e.error, e.reason]);
+   }  else if (e.name && e.stack) {
+      respond(["error", e.name, e.stack]);
     } else if (e.name) {
       respond(["error", e.name, e]);
     } else {

Reply via email to