]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/utils/strings/class_StringUtils.php
Continued:
[core.git] / framework / main / classes / utils / strings / class_StringUtils.php
index c97c9fe3d23c0c3247fa8fb7b3e691bbedeef494..972035c12e0b827bc14a177fdc97b2166d078d56 100644 (file)
@@ -274,7 +274,7 @@ final class StringUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: hex=%s - CALLED!', $hex));
                if (empty($hex)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hex" is empty');
+                       throw new InvalidArgumentException('Parameter "hex" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Convert to all lower-case
@@ -366,7 +366,7 @@ final class StringUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: asc=%s - CALLED!', $asc));
                if (empty($asc)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "asc" is empty');
+                       throw new InvalidArgumentException('Parameter "asc" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Convert it into a hexadecimal number
@@ -421,7 +421,7 @@ final class StringUtils extends BaseFrameworkSystem {
                /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: hex=%s - CALLED!', $hex));
                if (empty($hex)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "hex" is empty');
+                       throw new InvalidArgumentException('Parameter "hex" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                } elseif ((strlen($hex) % 2) != 0) {
                        // Throw it again
                        throw new InvalidArgumentException(sprintf('hex=%s length not dividable by 2', $hex));
@@ -456,7 +456,7 @@ final class StringUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: str=%s - CALLED!', $str));
                if (empty($str)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "str" is empty');
+                       throw new InvalidArgumentException('Parameter "str" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // First compress the string (gzcompress is okay)
@@ -512,7 +512,7 @@ final class StringUtils extends BaseFrameworkSystem {
                //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('STRING-UTILS: num=%s,assertMismatch=%d - CALLED!', $num, intval($assertMismatch)));
                if (empty($num)) {
                        // Throw IAE
-                       throw new InvalidArgumentException('Parameter "num" is empty');
+                       throw new InvalidArgumentException('Parameter "num" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT);
                }
 
                // Filter all numbers out