mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fix stderr formatting of ErisError
This commit is contained in:
parent
a60cb92b74
commit
2b1a86bf0e
1 changed files with 4 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
import util from "util";
|
||||
|
||||
export class ErisError extends Error {
|
||||
code: number | string | undefined;
|
||||
shardId: number;
|
||||
|
@ -8,7 +10,7 @@ export class ErisError extends Error {
|
|||
this.shardId = shardId;
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `[ERIS] [CODE ${this.code || "?"}] [SHARD ${this.shardId}] ${this.message}`;
|
||||
[util.inspect.custom]() {
|
||||
return `[ERIS] [ERROR CODE ${this.code || "?"}] [SHARD ${this.shardId}] ${this.message}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue