Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw 'Exception' in try catch to process.on('uncaughtException',callback) #23

Open
letiennam29 opened this issue Oct 9, 2015 · 0 comments

Comments

@letiennam29
Copy link

Hi everyone,
I think script code in file "pomelo-rpc/lib/rpc-server/acceptors/ws-acceptor.js" need throw to process on uncaughtException. It flexibility for deverlop.

Because sometime exception i need wirter log after check.

socket.on('message', function(pkg) {
try {
if(pkg instanceof Array) {
processMsgs(socket, self, pkg);
} else {
processMsg(socket, self, pkg);
}
} catch(e) {
// socke.io would broken if uncaugth the exception
logger.error('rpc server process message error: %j', e.stack);
//add code
throw e;
}
});
process.on('uncaughtException', function (err) {
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant