Commit aa1dd2f2 authored by Ray Bellis's avatar Ray Bellis

catch exceptions in handlers

parent 0557d91e
......@@ -72,12 +72,15 @@ async function getResponse(type, req, handlers)
return;
}
// pass to handlers, unless it's a Status-Server packet
if (req.code !== Code.STATUS_SERVER) {
await invokeHandlers(req, res, type, handlers);
try {
// pass to handlers, unless it's a Status-Server packet
if (req.code !== Code.STATUS_SERVER) {
await invokeHandlers(req, res, type, handlers);
}
return res;
} catch (e) {
console.error(e);
}
return res;
}
function startServer(type, port, state)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment