diff --git a/src/HeaderSecurity.php b/src/HeaderSecurity.php index 231beac0..8f3ffd2e 100644 --- a/src/HeaderSecurity.php +++ b/src/HeaderSecurity.php @@ -129,7 +129,7 @@ public static function isValid($value) public static function assertValid($value) { if (! self::isValid($value)) { - throw new InvalidArgumentException('Invalid header value'); + throw new InvalidArgumentException("'$value' is not valid header value"); } } @@ -143,7 +143,7 @@ public static function assertValid($value) public static function assertValidName($name) { if (! preg_match('/^[a-zA-Z0-9\'`#$%&*+.^_|~!-]+$/', $name)) { - throw new InvalidArgumentException('Invalid header name'); + throw new InvalidArgumentException("'$name' is not valid header name"); } } }