I have a domain exception handler (wrapper for nightwatch tests).
*This is my exception handler wrapper* -
var domainError = function(func) {
return function() {
var d = domain.create().on('error', function(err) {
console.error(err.stack);
});
d.enter();
try {
return func.apply(this, arguments);
}
catch (err) {
//do something with the err
}
d.exit();
}};
I am trying to set timeouts so that "return func.apply(this, arguments);"
doesn't take forever. Could anyone suggest how I can add timeouts and make
the domain end the function and exit, if it exceeds timeout?
Thanks
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/406338d8-d4cf-481a-9861-ee0a49796454%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.