{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/php-jwt/issues/65","labels_url":"https://api.github.com/repos/firebase/php-jwt/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/firebase/php-jwt/issues/65/comments","events_url":"https://api.github.com/repos/firebase/php-jwt/issues/65/events","html_url":"https://github.com/firebase/php-jwt/issues/65","id":102313769,"number":65,"title":"How to catch Expired token","user":{"login":"shiroamada","id":2062946,"avatar_url":"https://avatars.githubusercontent.com/u/2062946?v=3","gravatar_id":"","url":"https://api.github.com/users/shiroamada","html_url":"https://github.com/shiroamada","followers_url":"https://api.github.com/users/shiroamada/followers","following_url":"https://api.github.com/users/shiroamada/following{/other_user}","gists_url":"https://api.github.com/users/shiroamada/gists{/gist_id}","starred_url":"https://api.github.com/users/shiroamada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiroamada/subscriptions","organizations_url":"https://api.github.com/users/shiroamada/orgs","repos_url":"https://api.github.com/users/shiroamada/repos","events_url":"https://api.github.com/users/shiroamada/events{/privacy}","received_events_url":"https://api.github.com/users/shiroamada/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-21T06:59:58Z","updated_at":"2015-08-21T07:42:38Z","closed_at":null,"body":"I got this Fatal error: Uncaught exception 'Firebase\\JWT\\ExpiredException' with message 'Expired token' in\r\nI try to run try and catch, but it still come out Fatal Error. \r\n```\r\ntry{\r\n\t$decoded = JWT::decode($jwt, $key, array('HS256'));\r\n}catch(\\Exception $e){\r\n\t echo 'Caught exception: ',  $e->getMessage(), \"\\n\";\r\n}\r\n```\r\n\r\nI am using PHP-5.4.36\r\nHow to catch this error?\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/firebase/php-jwt/issues/comments/133316822","html_url":"https://github.com/firebase/php-jwt/issues/65#issuecomment-133316822","issue_url":"https://api.github.com/repos/firebase/php-jwt/issues/65","id":133316822,"user":{"login":"shiroamada","id":2062946,"avatar_url":"https://avatars.githubusercontent.com/u/2062946?v=3","gravatar_id":"","url":"https://api.github.com/users/shiroamada","html_url":"https://github.com/shiroamada","followers_url":"https://api.github.com/users/shiroamada/followers","following_url":"https://api.github.com/users/shiroamada/following{/other_user}","gists_url":"https://api.github.com/users/shiroamada/gists{/gist_id}","starred_url":"https://api.github.com/users/shiroamada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shiroamada/subscriptions","organizations_url":"https://api.github.com/users/shiroamada/orgs","repos_url":"https://api.github.com/users/shiroamada/repos","events_url":"https://api.github.com/users/shiroamada/events{/privacy}","received_events_url":"https://api.github.com/users/shiroamada/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T07:42:37Z","updated_at":"2015-08-21T07:42:37Z","body":"try{\r\n\t\t\t\r\n\t\t\t$decoded = JWT::decode($jwt, $key, array('HS256'));\r\n\t\t}catch(\\Firebase\\JWT\\ExpiredException $e){\r\n\t\t\t echo 'Caught exception: ',  $e->getMessage(), \"\\n\";\r\n\t\t}\r\n\r\nOk, i miss out the namespace. Sorry for it."}}