From bbd89946d2dd470985641dedddacf3277bad3d67 Mon Sep 17 00:00:00 2001 From: SolarisFox Date: Fri, 26 Jun 2015 15:52:51 -0700 Subject: [PATCH] Proper error handling in /dexsearch and /movesearch --- chat-plugins/info.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chat-plugins/info.js b/chat-plugins/info.js index 383fe29353..2af8f780b8 100644 --- a/chat-plugins/info.js +++ b/chat-plugins/info.js @@ -642,7 +642,7 @@ var commands = exports.commands = { break; default: - return this.sendReplyBox("Something broke! PM SolarisFox here or on the Smogon forums with the command you tried."); + throw new Error("/dexsearch search category '" + search + "' was unrecognised."); } } @@ -1025,7 +1025,7 @@ var commands = exports.commands = { break; default: - return this.sendReplyBox("Something broke! PM SolarisFox here or on the Smogon forums with the command you tried."); + throw new Error("/movesearch search category '" + search + "' was unrecognised."); } }