aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/Main.hx
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Main.hx')
-rw-r--r--src/server/Main.hx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx
index 3cde049..df2d3cd 100644
--- a/src/server/Main.hx
+++ b/src/server/Main.hx
@@ -106,8 +106,16 @@ class Main {
});
exit();
});
- process.on("unhandledRejection", (reason, promise) -> {
- logError("unhandledRejection", reason);
+ process.on("unhandledRejection", (err, promise) -> {
+ if (err is js.lib.Error) {
+ final err:js.lib.Error = err;
+ logError("unhandledRejection", {
+ message: err.message,
+ stack: err.stack
+ });
+ } else {
+ logError("unhandledRejection", '$err');
+ }
exit();
});
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage