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