Don't ignore synchronous errors when calling Node

This commit is contained in:
SteveSandersonMS
2015-12-14 13:16:39 +00:00
parent 918d8d422a
commit 80575a092e
4 changed files with 31 additions and 19 deletions

View File

@@ -39,7 +39,11 @@ var server = http.createServer(function(req, res) {
}
};
func.apply(null, [callback].concat(bodyJson.args));
try {
func.apply(null, [callback].concat(bodyJson.args));
} catch (synchronousException) {
callback(synchronousException, null);
}
});
});