I am facing a challenge in Oak where I want to capture errors for logging purposes. Is there a way to catch an error when using the "app.listen" method? I've tried implementing try/catch, but it appears that Deno intercepts the error before my code can handle it.
try{
app.listen({port:
3000});
logger.info('Listening...');
}catch(e){
handleTheError(e);
}