mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Errors Standardization (#1246)
* errors and stuff * more errors * all the errors * fix build
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const Util = require('../util/Util');
|
||||
const { Error } = require('../errors');
|
||||
|
||||
/**
|
||||
* Helper class for sharded clients spawned as a child process, such as from a ShardingManager.
|
||||
@@ -40,7 +41,7 @@ class ShardClientUtil {
|
||||
const sent = process.send(message, err => {
|
||||
if (err) reject(err); else resolve();
|
||||
});
|
||||
if (!sent) throw new Error('Failed to send message to master process.');
|
||||
if (!sent) throw new Error('SHARDING_PARENT_CONNECTION');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user