« get me outta code hell

upd8: nicer uncaught error-with-cause logging - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-11-05 18:26:20 -0400
committer(quasar) nebula <qznebula@protonmail.com>2023-11-05 18:34:11 -0400
commitea971431bb08641e26c399edd1bc74b838931b02 (patch)
treef38a0ac5285ae24834598f9e94feeb14bcc3ed40 /src
parent42908282b410077eb7b01325a5257f5441dd0873 (diff)
upd8: nicer uncaught error-with-cause logging
Diffstat (limited to 'src')
-rwxr-xr-xsrc/upd8.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 15247878..7cb42027 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -1428,6 +1428,9 @@ if (true || isMain(import.meta.url) || path.basename(process.argv[1]) === 'hsmus
     } catch (error) {
       if (error instanceof AggregateError) {
         showAggregate(error);
+      } else if (error.cause) {
+        console.error(error);
+        showAggregate(error);
       } else {
         console.error(error);
       }