Fix constants errors not giving a stacktrace

This commit is contained in:
Amish Shah
2016-09-04 11:53:30 +01:00
parent 4d2bb891a9
commit 9c915d1e0a
7 changed files with 14 additions and 14 deletions

View File

@@ -30,7 +30,7 @@ class ClientManager {
this.client.ws.connect(gateway);
this.client.once(Constants.Events.READY, () => resolve(token));
}).catch(reject);
this.client.setTimeout(() => reject(Constants.Errors.TOOK_TOO_LONG), 1000 * 300);
this.client.setTimeout(() => reject(new Error(Constants.Errors.TOOK_TOO_LONG)), 1000 * 300);
}
/**