Change exception class in BoxHandler::createBoxCondition()
authorMatthias Schmidt <gravatronics@live.com>
Thu, 9 Jun 2016 17:20:33 +0000 (19:20 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 9 Jun 2016 17:20:33 +0000 (19:20 +0200)
wcfsetup/install/files/lib/system/box/BoxHandler.class.php

index 5a5e378dbcebb2539065bd7c31e08373667a8e45..f1939220526c5cee08b41589afc72af21786df22 100644 (file)
@@ -57,7 +57,7 @@ class BoxHandler extends SingletonFactory {
         * @param       string          $conditionDefinition
         * @param       string          $conditionObjectType
         * @param       array           $conditionData
-        * @throws      SystemException
+        * @throws      \InvalidArgumentException
         */
        public function createBoxCondition($boxIdentifier, $conditionDefinition, $conditionObjectType, array $conditionData) {
                // do not rely on caches during package installation
@@ -72,12 +72,12 @@ class BoxHandler extends SingletonFactory {
                $objectTypeID = $statement->fetchSingleColumn();
                
                if (!$objectTypeID) {
-                       throw new SystemException("Unknown box condition '{$conditionObjectType}' of condition definition '{$conditionDefinition}'");
+                       throw new \InvalidArgumentException("Unknown box condition '{$conditionObjectType}' of condition definition '{$conditionDefinition}'");
                }
                
                $box = Box::getBoxByIdentifier($boxIdentifier);
                if ($box === null) {
-                       throw new SystemException("Unknown box with idenifier '{$boxIdentifier}'");
+                       throw new \InvalidArgumentException("Unknown box with idenifier '{$boxIdentifier}'");
                }
                
                (new ConditionAction([], 'create', [