From 4f33028286037a8ce6cc3ecfa7d30a5ed430d882 Mon Sep 17 00:00:00 2001 From: bdistin Date: Wed, 20 Sep 2017 16:48:59 -0500 Subject: [PATCH] Make the error better, especially if another load error --- src/lib/structures/interfaces/Store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/structures/interfaces/Store.js b/src/lib/structures/interfaces/Store.js index 609f57cc59..a522e8cc9f 100644 --- a/src/lib/structures/interfaces/Store.js +++ b/src/lib/structures/interfaces/Store.js @@ -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;