From 93605de685762fb00ec2004dd28b44c71f15aed4 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sun, 20 Apr 2014 15:47:35 +0200 Subject: [PATCH] fixed exception --- application/core/Configurators/ScriptSettings.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/application/core/Configurators/ScriptSettings.php b/application/core/Configurators/ScriptSettings.php index 11f8626a..0422f310 100644 --- a/application/core/Configurators/ScriptSettings.php +++ b/application/core/Configurators/ScriptSettings.php @@ -169,14 +169,11 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener { try { $scriptInfo = $this->maniaControl->client->getModeScriptInfo(); - } catch(Exception $e) { - if ($e->getMessage() == 'Not in script mode.') { - $label = new Label(); - $frame->add($label); - $label->setText($e->getMessage()); - return $frame; - } - throw $e; + } catch(NotInScriptModeException $e) { + $label = new Label(); + $frame->add($label); + $label->setText($e->getMessage()); + return $frame; } $scriptParams = $scriptInfo->paramDescs;