mirror of
https://github.com/friendica/friendica
synced 2025-04-22 12:30:12 +00:00
Use "Exception"
This commit is contained in:
parent
2b513a48c7
commit
6e3602591d
20 changed files with 41 additions and 41 deletions
|
@ -120,8 +120,8 @@ class Statuses extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -77,8 +77,8 @@ class Bookmarks extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -79,8 +79,8 @@ class Favourited extends BaseApi
|
|||
self::setBoundaries($item['thr-parent-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['thr-parent-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['thr-parent-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['thr-parent-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -117,7 +117,7 @@ class Accounts extends BaseApi
|
|||
self::setBoundaries($member['contact-id']);
|
||||
try {
|
||||
$accounts[] = DI::mstdnAccount()->createFromContactId($member['contact-id'], $uid);
|
||||
} catch (\Throwable $th) {
|
||||
} catch (\Exception $exception) {
|
||||
}
|
||||
}
|
||||
DBA::close($members);
|
||||
|
|
|
@ -183,8 +183,8 @@ class Search extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -99,8 +99,8 @@ class Home extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -104,8 +104,8 @@ class ListTimeline extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -99,8 +99,8 @@ class PublicTimeline extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -120,8 +120,8 @@ class Tag extends BaseApi
|
|||
self::setBoundaries($item['uri-id']);
|
||||
try {
|
||||
$statuses[] = DI::mstdnStatus()->createFromUriId($item['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $item['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($items);
|
||||
|
|
|
@ -57,8 +57,8 @@ class Statuses extends BaseApi
|
|||
while ($status = Post::fetch($statuses)) {
|
||||
try {
|
||||
$trending[] = DI::mstdnStatus()->createFromUriId($status['uri-id'], $uid, $display_quotes);
|
||||
} catch (\Throwable $th) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $status['uri-id'], 'uid' => $uid, 'error' => $th]);
|
||||
} catch (\Exception $exception) {
|
||||
Logger::info('Post not fetchable', ['uri-id' => $status['uri-id'], 'uid' => $uid, 'exception' => $exception]);
|
||||
}
|
||||
}
|
||||
DBA::close($statuses);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue