]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/helper/class_BaseHelper.php
Continued:
[core.git] / framework / main / classes / helper / class_BaseHelper.php
index 413655db6ab6bc2c06b991aeb7d35f61f8406c43..ef87c282c934af8ee2472694b0909012a03a274b 100644 (file)
@@ -19,7 +19,7 @@ use \InvalidArgumentException;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -78,11 +78,10 @@ abstract class BaseHelper extends BaseFrameworkSystem {
        private $totalCounter = 0;
 
        // Exception constants
-       const EXCEPTION_GROUP_NOT_OPENED             = 0x1e3;
-       const EXCEPTION_GROUP_ALREADY_FOUND          = 0x1e4;
-       const EXCEPTION_SUB_GROUP_ALREADY_FOUND      = 0x1e5;
-       const EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED = 0x1e6;
-       const EXCEPTION_NO_PREVIOUS_GROUP_OPENED     = 0x1e7;
+       const EXCEPTION_GROUP_NOT_OPENED             = 0x1e0;
+       const EXCEPTION_SUB_GROUP_ALREADY_FOUND      = 0x1e1;
+       const EXCEPTION_NO_PREVIOUS_SUB_GROUP_OPENED = 0x1e2;
+       const EXCEPTION_NO_PREVIOUS_GROUP_OPENED     = 0x1e3;
 
        /**
         * Protected constructor
@@ -315,7 +314,7 @@ abstract class BaseHelper extends BaseFrameworkSystem {
                        throw new InvalidArgumentException('Parameter "groupId" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif (isset($this->groups[$groupId])) {
                        // Then throw an exception here
-                       throw new BadMethodCallException(sprintf('[%s:%d]: groupId=%s is already opened.', $this->__toString(), $groupId), self::EXCEPTION_GROUP_ALREADY_FOUND);
+                       throw new BadMethodCallException(sprintf('[%s:%d]: groupId=%s is already opened.', $this->__toString(), $groupId), FrameworkInterface::EXCEPTION_BAD_METHOD_CALL);
                } elseif (empty($content)) {
                        // Throw IAE
                        throw new InvalidArgumentException('Parameter "content" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);