Added persistent rescheduling of nowPlaying after server goes down.

This commit is contained in:
rainbow napkin 2025-02-11 07:39:20 -05:00
parent 179a10fb72
commit a41541d07b
10 changed files with 124 additions and 25 deletions

View file

@ -26,12 +26,17 @@ module.exports.errorHandler = function(res, msg, type = "Generic", status = 400)
}
}
module.exports.exceptionHandler = function(res, err){
module.exports.localExceptionHandler = function(err){
//If we're being verbose
if(config.verbose){
//Log the error
console.log(err)
}
}
module.exports.exceptionHandler = function(res, err){
//Locally handle the exception
module.exports.localExceptionHandler(err);
//if not yell at the browser for fucking up, and tell it what it did wrong.
module.exports.errorHandler(res, err.message, "Caught Exception");
@ -42,11 +47,8 @@ module.exports.socketErrorHandler = function(socket, msg, type = "Generic"){
}
module.exports.socketExceptionHandler = function(socket, err){
//If we're being verbose
if(config.verbose){
//Log the error
console.log(err)
}
//Locally handle the exception
module.exports.localExceptionHandler(err);
//if not yell at the browser for fucking up, and tell it what it did wrong.
return module.exports.socketErrorHandler(socket, err.msg, "Caught Exception");