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

Fatal error: Uncaught exception 'EpiTwitterException' #203

Open
sharathkumar6 opened this issue Feb 3, 2015 · 8 comments
Open

Fatal error: Uncaught exception 'EpiTwitterException' #203

sharathkumar6 opened this issue Feb 3, 2015 · 8 comments

Comments

@sharathkumar6
Copy link

Receiving this error from last week:

Fatal error: Uncaught exception 'EpiTwitterException' in EpiTwitter.php:245
Stack trace: #0 EpiTwitter.php(197): EpiTwitterException::raise(Object(EpiCurlManager), false) #1
EpiTwitterJson->__get('response') #2 EpiTwitter.php(41): EpiTwitter->request('POST', '/statuses/updat...', Array) #3 simpleTest.php(13): EpiTwitter->post('/statuses/updat...', Array) #4 {main} thrown in EpiTwitter.php on line 245

Please Help

@macrobatic
Copy link

I'm in the same exact boat. Please help. Did you figure this out?

@jissereitsma
Copy link

Are you using a try-catch statement when trying to post a tweet? The first issue here is that the error says "Uncaught Exception" - so it must be caught first. What is the value of $exception->getMessage() when this exception is caught?

@macrobatic
Copy link

I'm simply running the shoutcast_v1.php file (after updating it of course w. shoutcast info and tokens) found here: https://github.com/dlnetworks/twittercast/ . We're trying to implement twittercast. honestly, I'm not well versed in PHP. I'm assuming I need a debugger to answer your question.

@jissereitsma
Copy link

Indeed this other project is missing try-catch statements (http://php.net/manual/en/language.exceptions.php) so this causes the exception error to generate another PHP Fatal Error. A simple statement around the last line would possibly fix it:

try {
    $twitterObj->post(....copy...);
} catch(Exception $e) {
    echo $e->getMessage();
}

@macrobatic
Copy link

Unfortunately, It doesn't fix it. All I get is a blank screen (which may be expected) but no twitter update. I'm using Godaddy's shared hosting. I'm contact them b/c I can't seem to find the error log for my site.

@macrobatic
Copy link

Ok. So, there is no error log available for me to peruse b/c I'm using a Plexus server instead of a Linux server. Godaddy did go ahead and update the web.config file. Now, if I don't implement your suggestion I get the original error. If I do implement your suggestion I get the following:

{"errors":[{"code":170,"message":"Missing required parameter: status."}]}

@jissereitsma
Copy link

So this makes the problem evident, right? You are supposed to give a parameter "status" but did not.

@jmathai
Copy link
Owner

jmathai commented Jul 28, 2015

You'll want to make sure you wrap every call in a try/catch block. See the docs here about how this library throws exceptions.

https://github.com/jmathai/twitter-async/wiki#exceptions

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

4 participants