Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Exception handling is broken #178

Open
jgberg opened this issue Jun 17, 2013 · 5 comments
Open

Exception handling is broken #178

jgberg opened this issue Jun 17, 2013 · 5 comments

Comments

@jgberg
Copy link

jgberg commented Jun 17, 2013

We're having serious problem with exception handling. These are probably 429 errors but we don't know since, response->code is not set. So we try to print the exception via print_r( e, true), but it consumes too much memory to actually print_r() -- it always gets a fatal PHP memory error no matter how big we make memory via ini( memory_limit, ...).

So, if you can cause some twitter exception in your testing ... especially a 429 and get it to return a proper EPI_exception that would help...

@LeagueRivals
Copy link

I've got the same problem (in EpiOAuth.php). I take it's a result of the 1.1 switch over? I thought it might be a service interruption on Twitter's side? It was working last night

@jmathai
Copy link
Owner

jmathai commented Jun 17, 2013

Know if fixing #176 fixes it?

@LeagueRivals
Copy link

I'm not sure how to patch this uncaught exception, I get the following error below without even trying to sign in with Twitter?

Fatal error: Uncaught exception 'EpiOAuthException' in //////htdocs/twitter-async-master/EpiOAuth.php:436 Stack trace: #0 /////htdocs/twitter-async-master/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false) #1 /////htdocs/twitter-async-master/EpiOAuth.php(45): EpiOAuthResponse->__get('oauth_token') #2 /////htdocs/index.php(9): EpiOAuth->getAuthenticateUrl() #3 {main} thrown in //////htdocs/twitter-async-master/EpiOAuth.php on line 436

@LeagueRivals
Copy link

Hi jmathai,

I'm been using the following tutorial for sign in with Twitter - http://webtutsdepot.com/2009/09/23/sign-in-with-twitter-example/

It was working fine a few days ago however it now has the Fatal error: Uncaught exception issue form the post above. I've updated the documentation for the 1.1 switch over however it's still not working. I've looked around for a solution and found the following in a prior issue but I'm not sure where it should go in the tutorial code.

try{
$twitterInfo = $twitterObj->get('/account/verify_credentials.json');
$res = $twitterInfo->response; //valid session
} catch(EpiTwitterException $e){
// this catches all of the EpiTwitter* exceptions
}

Any help would be greatly appreciated.

@jgberg
Copy link
Author

jgberg commented Jun 19, 2013

Not sure what you mean by failing... but add a 2nd catch.
catch( Exception $e )
{...}

On Wed, Jun 19, 2013 at 3:36 AM, Sam [email protected] wrote:

Hi jmathai,

I'm been using the following tutorial for sign in with Twitter -
http://webtutsdepot.com/2009/09/23/sign-in-with-twitter-example/

It was working fine a few days ago however it now has the Fatal error:
Uncaught exception issue form the post above. I've updated the
documentation for the 1.1 switch over however it's still not working. I've
looked around for a solution and found the following in a prior issue but
I'm not sure where it should go in the tutorial code.

try{
$twitterInfo = $twitterObj->get('/account/verify_credentials.json');
$res = $twitterInfo->response; //valid session
} catch(EpiTwitterException $e){
// this catches all of the EpiTwitter* exceptions
}

Any help would be greatly appreciated.


Reply to this email directly or view it on GitHubhttps://github.com//issues/178#issuecomment-19675673
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants