From 9dc1d6c91e8bbb270eda0dbb110f9d715617e1ce Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 19 Apr 2014 23:40:54 +0200 Subject: [PATCH] exception plugins --- application/plugins/CustomVotes.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/application/plugins/CustomVotes.php b/application/plugins/CustomVotes.php index 43ee9352..6195d71b 100644 --- a/application/plugins/CustomVotes.php +++ b/application/plugins/CustomVotes.php @@ -27,6 +27,7 @@ use ManiaControl\Server\Server; use ManiaControl\Server\ServerCommands; use Maniaplanet\DedicatedServer\Structures\VoteRatio; use Maniaplanet\DedicatedServer\Xmlrpc\Exception; +use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException; /** @@ -261,12 +262,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP $itemQuad->setAction(self::ACTION_START_VOTE . 'pausegame'); $this->addVoteMenuItem($itemQuad, 10, 'Vote for a pause of Current Game'); } - } catch(Exception $e) { - if ($e->getMessage() == 'Not in script mode.') { - // Do nothing - } else { - throw $e; - } + } catch(NotInScriptModeException $e) { } //Menu SkipMap