From 0ed3d8e7c56cc93a105e03bf8415bba5b601f060 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 15 May 2024 02:37:50 -0600 Subject: [PATCH] fix: also log custom error types that don't have a .stack to trace --- demo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo.js b/demo.js index f3c6ce6..36e5c6a 100644 --- a/demo.js +++ b/demo.js @@ -1313,6 +1313,6 @@ main() }) .catch(function (err) { console.error('Fail:'); - console.error(err.stack); + console.error(err.stack || err); process.exit(1); });