You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2020/09/18 10:28:58 UTC
[couchdb] 01/01: Print stack if name and stack of exception are
present
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 <ji...@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 {