Rewrite AppDomain to handle uncaughts & promises
This commit is contained in:
+13
-1
@@ -133,7 +133,19 @@ class Dragonfly
|
||||
else
|
||||
{
|
||||
// Send to master to prevent multiple process competing to write into the handler
|
||||
this.logHandler = { write: function( e ) { process.send({ cmd: "dragonLog", data: e }); } };
|
||||
this.logHandler = {
|
||||
write: function( e ) {
|
||||
process.send(
|
||||
{ cmd: "dragonLog", data: e }
|
||||
, ( er ) => {
|
||||
if( er )
|
||||
{
|
||||
console.log( er.code, e );
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var tag = cluster.isMaster ? "M" : "S";
|
||||
|
||||
Reference in New Issue
Block a user