api error reporting for attachment errors

This commit is contained in:
Hannes Mannerheim 2017-02-05 13:17:36 +01:00
parent 5b868f8dff
commit c09da94eda

View File

@ -619,6 +619,7 @@ class QvitterPlugin extends Plugin {
// this applies to older versions of gnu social, i think
} catch (Exception $e) {
$twitter_status['attachment_error'] = array('code'=>$e->getCode(),'message'=>$e->getMessage(),'file'=>$e->getFile(),'line'=>$e->getLine(),'trace'=>$e->getTraceAsString());
$thumb = File_thumbnail::getKV('file_id', $attachment->id);
if ($thumb instanceof File_thumbnail) {
$thumb_url = $thumb->getUrl();