When i try to handle global errors like this
async function Night(context, scope) { try { // ... (your existing Night function code) } catch (error) { context.log('Error in Night function:', error.message); }}
async function startAnalysis(context, scope) { try { console.log("Running");
// ........... (existing code)
// function call await Night(context, scope);
// ........... (existing code)
} catch (error) { context.log(`Error in startAnalysis: ${error.message}`); }}
module.exports = new Analysis(startAnalysis);
I get syntax error on
SyntaxError: Unexpected token 'catch' at Immediate.<anonymous> ([eval]:8:44) at process.processImmediate (node:internal/timers
Can anyone give me some dirrection on this?
I suspect that maybe, as this is a function within a larger program of TagoIO that the error handling on a global scale is handled their side.
Thanks