1
0
Fork 0
mirror of synced 2024-07-02 21:20:58 +12:00
appwrite/app/controllers/api
Steven Nguyen 4ace8ed027
Replace catching \Exception with \Throwable
\Exception doesn't work as a catch-all because not everything extends
\Exception. For example, there was a problem where the messaging worker
didn't catch an exception here:

} catch (\Exception $e) {
    $deliveryErrors[] = 'Failed sending to targets ' . $batchIndex + 1 . '-' . \count($batch) . ' with error: ' . $e->getMessage();
} finally {

As such, $deliveryErrors stayed as an empty array. In this case, the
$adapter->send() threw a TypeError which extends Error which implements
Throwable. Updating the catch to catch \Throwable ensures the error is
caught and $deliveryErrors gets updated.
2024-02-08 01:17:54 +00:00
..
account.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
avatars.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
console.php sync with 1.4 2023-10-02 17:02:48 +03:00
databases.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
functions.php Merge branch '1.5.x' of github.com:appwrite/appwrite into json-parsing 2024-01-25 17:44:05 +02:00
graphql.php sync with 1.4 2023-10-02 17:02:48 +03:00
health.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
locale.php sync with 1.4 2023-10-02 17:02:48 +03:00
messaging.php Add missing enum cases 2024-02-05 20:25:34 +13:00
migrations.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
project.php rename stats collection 2023-12-18 10:11:10 +00:00
projects.php fix: remove some leftovers 2024-01-30 16:09:58 +01:00
proxy.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
storage.php Merge remote-tracking branch 'origin/1.5.x' into feat-php-8-1 2024-01-30 18:44:16 +13:00
teams.php Replace catching \Exception with \Throwable 2024-02-08 01:17:54 +00:00
users.php Fix user API mfa route auth 2024-02-07 18:08:51 +13:00
vcs.php TYPE_CURSOR_AFTER TYPE_CURSOR_BEFORE 2023-12-06 15:10:40 +01:00