Implemented back-end for basic time-based queueing system.

This commit is contained in:
rainbow napkin 2025-01-19 15:13:31 -05:00
parent f38eae170d
commit 4f6b3318a0
11 changed files with 329 additions and 140 deletions

View file

@ -37,6 +37,10 @@ module.exports.exceptionHandler = function(res, err){
module.exports.errorHandler(res, err.message, "Caught Exception");
}
module.exports.socketErrorHandler = function(socket, msg, type = "Generic"){
return socket.emit("error", {errors: [{type, msg, date: new Date()}]});
}
module.exports.socketExceptionHandler = function(socket, err){
//If we're being verbose
if(config.verbose){
@ -45,7 +49,7 @@ module.exports.socketExceptionHandler = function(socket, err){
}
//if not yell at the browser for fucking up, and tell it what it did wrong.
return socket.emit("error", {errors: [{type: "Caught Exception", msg: err.message, date: new Date()}]});
return module.exports.socketErrorHandler(socket, err.msg, "Caught Exception");
}
module.exports.socketCriticalExceptionHandler = function(socket, err){