Improved exception handling, started work on improving error messages for IP bans
This commit is contained in:
parent
7d3c31f0aa
commit
853f67fe15
15 changed files with 118 additions and 77 deletions
|
|
@ -312,7 +312,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while queue item!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while queue item!`, "queue");
|
||||
}
|
||||
|
||||
//For each item
|
||||
|
|
@ -409,7 +409,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while queue item!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while queue item!`, "queue");
|
||||
}
|
||||
|
||||
//Keep a copy of the archive that hasn't been changed
|
||||
|
|
@ -470,7 +470,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while queue item!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while queue item!`, "queue");
|
||||
}
|
||||
|
||||
//Filter media out by UUID
|
||||
|
|
@ -611,7 +611,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while saving item to queue!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while saving item to queue!`, "queue");
|
||||
}
|
||||
|
||||
//Add media to the persistant schedule
|
||||
|
|
@ -766,7 +766,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while ending queue item!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while ending queue item!`, "queue");
|
||||
}
|
||||
|
||||
//If we haven't changed 'nowPlaying' in the play list
|
||||
|
|
@ -909,7 +909,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while rehydrating queue!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while rehydrating queue!`, "queue");
|
||||
}
|
||||
|
||||
//Create an empty array to hold our schedule
|
||||
|
|
@ -957,7 +957,7 @@ module.exports = class{
|
|||
//If we couldn't find the channel
|
||||
if(chanDB == null){
|
||||
//FUCK
|
||||
throw new Error(`Unable to find channel document ${this.channel.name} while rehydrating queue!`);
|
||||
throw loggerUtils.exceptionSmith(`Unable to find channel document ${this.channel.name} while rehydrating queue!`, "queue");
|
||||
}
|
||||
|
||||
const now = new Date().getTime();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue