Skip to content
This repository has been archived by the owner on Aug 28, 2020. It is now read-only.

Commit

Permalink
Make the error better, especially if another load error
Browse files Browse the repository at this point in the history
  • Loading branch information
bdistin authored Sep 20, 2017
1 parent ba5e222 commit 4f33028
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/structures/interfaces/Store.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class Store {
try {
piece = this.set(new (require(loc))(this.client, dir, file));
} catch (err) {
const error = err.message.endsWith('not a constructor') ? new TypeError(`Non-Class Export: ${loc}`) : err;
this.client.emit('wtf', error);
const error = err.message.endsWith('not a constructor') ? new TypeError(`Exported Structure Not A Class`) : err;
this.client.emit('wtf', `${error}\n${loc}`);
}
delete require.cache[loc];
return piece;
Expand Down

0 comments on commit 4f33028

Please sign in to comment.