2018-11-25 17:04:26 +02:00
|
|
|
import util from "util";
|
|
|
|
|
|
|
|
export class PluginRuntimeError {
|
|
|
|
public message: string;
|
|
|
|
public pluginName: string;
|
|
|
|
public guildId: string;
|
|
|
|
|
|
|
|
constructor(message: string, pluginName: string, guildId: string) {
|
|
|
|
this.message = message;
|
|
|
|
this.pluginName = pluginName;
|
|
|
|
this.guildId = guildId;
|
|
|
|
}
|
|
|
|
|
|
|
|
[util.inspect.custom](depth, options) {
|
|
|
|
return `PRE [${this.pluginName}] [${this.guildId}] ${this.message}`;
|
|
|
|
}
|
2019-02-09 14:33:39 +02:00
|
|
|
|
|
|
|
toString() {
|
|
|
|
return this[util.inspect.custom]();
|
|
|
|
}
|
2018-11-25 17:04:26 +02:00
|
|
|
}
|