Error event handler

This commit is contained in:
Nomi Nonsense (Nonszy) 2024-03-18 08:20:09 +07:00
parent e80b080ed4
commit b9671dbf21

View File

@ -49,6 +49,12 @@ server.listen(port, () => {
suBoard.connected = true;
})
board.on('error', (err) => {
console.error(chalk.red("\nError while connecting to Board"));
console.error(chalk.red(err.message));
console.log("Enter 'rs' to try again");
})
board.on('exit', () => {
console.log("Bye bye");
})