76 lines
1.9 KiB
TypeScript
76 lines
1.9 KiB
TypeScript
|
|
export class ExhaustedRetriesError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, ExhaustedRetriesError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `ExhaustedRetries: We retried the request the maximum amount of times.`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
export class RoomOfflineError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, RoomOfflineError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `RoomOffline. ${this.message}`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
|
|
export class AdminAbortedError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, AdminAbortedError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `AdminAbortedError. ${this.message}`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
|
|
export class UploadFailedError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, UploadFailedError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `UploadFailedError. ${this.message}`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
export class PlaylistFailedError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, PlaylistFailedError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `PlaylistFailedError. ${this.message}`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export class DownloadFailedError extends Error {
|
|
constructor(message?: string) {
|
|
super(message)
|
|
Object.setPrototypeOf(this, DownloadFailedError.prototype)
|
|
this.name = this.constructor.name
|
|
this.message = `DownloadFailedError. ${this.message}`
|
|
}
|
|
getErrorMessage() {
|
|
return this.message
|
|
}
|
|
} |