aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/DB/Exceptions
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-04-13 12:53:40 +0200
committerJulius Härtl <jus@bitgrid.net>2023-05-02 19:42:11 +0200
commit3bdd7701297fa0958dddf11e69668dfafe2fa990 (patch)
tree3d033ce51264a098476658f0ce75640c9c59725c /lib/private/DB/Exceptions
parentc995428431c5b1a6b593cd960d63a25d027b9039 (diff)
downloadnextcloud-server-3bdd7701297fa0958dddf11e69668dfafe2fa990.tar.gz
nextcloud-server-3bdd7701297fa0958dddf11e69668dfafe2fa990.zip
fix: Check for wrapped retriable exceptions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/DB/Exceptions')
-rw-r--r--lib/private/DB/Exceptions/DbalException.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/DB/Exceptions/DbalException.php b/lib/private/DB/Exceptions/DbalException.php
index f9610c5bf25..2b860a50ff3 100644
--- a/lib/private/DB/Exceptions/DbalException.php
+++ b/lib/private/DB/Exceptions/DbalException.php
@@ -37,6 +37,7 @@ use Doctrine\DBAL\Exception\InvalidArgumentException;
use Doctrine\DBAL\Exception\InvalidFieldNameException;
use Doctrine\DBAL\Exception\NonUniqueFieldNameException;
use Doctrine\DBAL\Exception\NotNullConstraintViolationException;
+use Doctrine\DBAL\Exception\RetryableException;
use Doctrine\DBAL\Exception\ServerException;
use Doctrine\DBAL\Exception\SyntaxErrorException;
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
@@ -74,6 +75,10 @@ class DbalException extends Exception {
);
}
+ public function isRetryable(): bool {
+ return $this->original instanceof RetryableException;
+ }
+
public function getReason(): ?int {
/**
* Constraint errors