added domain error handling to requests and modules

This commit is contained in:
Ritchie Martori
2012-09-12 16:50:04 -07:00
parent 686423c96b
commit 837e436087
5 changed files with 66 additions and 42 deletions

6
test-app/node_modules/hello.js generated vendored
View File

@@ -7,8 +7,12 @@ function Hello(settings) {
util.inherits(Hello, Resource);
module.exports = Hello;
setTimeout(function () {
flarg();
}, 100);
Hello.prototype.handle = function (ctx, next) {
if(ctx.req && ctx.req.method !== 'GET') return next();
ctx.done(null, {hello: 'world'});
};