Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/DB/Exceptions/DbalException.php')
-rw-r--r--lib/private/DB/Exceptions/DbalException.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/private/DB/Exceptions/DbalException.php b/lib/private/DB/Exceptions/DbalException.php
index 4e0e1517048..bdb4d3147ae 100644
--- a/lib/private/DB/Exceptions/DbalException.php
+++ b/lib/private/DB/Exceptions/DbalException.php
@@ -76,19 +76,6 @@ class DbalException extends Exception {
public function getReason(): ?int {
/**
- * Generic errors
- */
- if ($this->original instanceof ConnectionException) {
- return parent::REASON_CONNECTION_LOST;
- }
- if ($this->original instanceof DriverException) {
- return parent::REASON_DRIVER;
- }
- if ($this->original instanceof InvalidArgumentException) {
- return parent::REASON_INVALID_ARGUMENT;
- }
-
- /**
* Constraint errors
*/
if ($this->original instanceof ForeignKeyConstraintViolationException) {
@@ -131,6 +118,19 @@ class DbalException extends Exception {
return parent::REASON_SERVER;
}
+ /**
+ * Generic errors
+ */
+ if ($this->original instanceof ConnectionException) {
+ return parent::REASON_CONNECTION_LOST;
+ }
+ if ($this->original instanceof InvalidArgumentException) {
+ return parent::REASON_INVALID_ARGUMENT;
+ }
+ if ($this->original instanceof DriverException) {
+ return parent::REASON_DRIVER;
+ }
+
return null;
}
}