grommunio /
grommunio-sync
| 1 | <?php |
||
| 2 | |||
| 3 | /* |
||
| 4 | * SPDX-License-Identifier: AGPL-3.0-only |
||
| 5 | * SPDX-FileCopyrightText: Copyright 2007-2016 Zarafa Deutschland GmbH |
||
| 6 | * SPDX-FileCopyrightText: Copyright 2020-2022 grommunio GmbH |
||
| 7 | * |
||
| 8 | * Indicates that an object was identified as broken. |
||
| 9 | * The SyncObject may be available for further analysis. |
||
| 10 | */ |
||
| 11 | |||
| 12 | class SyncObjectBrokenException extends GSyncException { |
||
| 13 | protected $defaultLogLevel = LOGLEVEL_WARN; |
||
| 14 | private $syncObject; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Returns the SyncObject which caused this Exception (if set). |
||
| 18 | * |
||
| 19 | * @return SyncObject |
||
| 20 | */ |
||
| 21 | public function GetSyncObject() { |
||
| 22 | return $this->syncObject ?? false; |
||
|
0 ignored issues
–
show
|
|||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Sets the SyncObject which caused the exception so it can be later retrieved. |
||
| 27 | * |
||
| 28 | * @param SyncObject $syncobject |
||
| 29 | * |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | public function SetSyncObject($syncobject) { |
||
| 33 | $this->syncObject = $syncobject; |
||
| 34 | |||
| 35 | return true; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
If the returned type also contains false, it is an indicator that maybe an error condition leading to the specific return statement remains unhandled.