Reorganize project. Add folder for shared code between backend/dashboard. Switch from jest to ava for tests.
This commit is contained in:
parent
80a82fe348
commit
16111bbe84
162 changed files with 11056 additions and 9900 deletions
21
backend/src/PluginRuntimeError.ts
Normal file
21
backend/src/PluginRuntimeError.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
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}`;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return this[util.inspect.custom]();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue