I am using a JWS library,to un-sign some tokens, so when the token was invalid I got the Exception InvalidArgumentException
({ "name": "Exception", "message": "The token \"123\" is an invalid JWS", "code": 0, "type": "InvalidArgumentException", "file": "/var/www/html/checkout/vendor/namshi/jose/src/Namshi/JOSE/JWS.php", "line": 143,)
$jws= SimpleJWS::load($data);
The static function load throws an exception if the token is not valid, and I don't want to display the exception message, instead I want to display a friendly error message.
any help?
try{} catch(invalidArgumentException $e ){}