//* 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
//* 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
/* 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));
//* 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)
//* 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