@@ -165,8 +165,7 @@ discard block |
||
| 165 | 165 | $this->setDeviceUserData($this->type, [self::$user => $this->device], self::$devid, -1, $doCas = "merge"); |
| 166 | 166 | SLog::Write(LOGLEVEL_DEBUG, "DeviceManager->Save(): Device data saved"); |
| 167 | 167 | } |
| 168 | - } |
|
| 169 | - catch (StateNotFoundException $snfex) { |
|
| 168 | + } catch (StateNotFoundException $snfex) { |
|
| 170 | 169 | SLog::Write(LOGLEVEL_ERROR, "DeviceManager->Save(): Exception: " . $snfex->getMessage()); |
| 171 | 170 | } |
| 172 | 171 | } |
@@ -950,11 +949,9 @@ discard block |
||
| 950 | 949 | } |
| 951 | 950 | $this->stateManager->SetDevice($this->device); |
| 952 | 951 | } |
| 953 | - } |
|
| 954 | - catch (StateNotFoundException $snfex) { |
|
| 952 | + } catch (StateNotFoundException $snfex) { |
|
| 955 | 953 | $this->hierarchySyncRequired = true; |
| 956 | - } |
|
| 957 | - catch (UnavailableException $uaex) { |
|
| 954 | + } catch (UnavailableException $uaex) { |
|
| 958 | 955 | // This is temporary and can be ignored e.g. in PING - see https://jira.z-hub.io/browse/ZP-1054 |
| 959 | 956 | // If the hash was not available before we treat it like a StateNotFoundException. |
| 960 | 957 | if ($this->deviceHash === false) { |
@@ -60,8 +60,7 @@ discard block |
||
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return true; |
| 63 | - } |
|
| 64 | - catch (GSyncException $e) { |
|
| 63 | + } catch (GSyncException $e) { |
|
| 65 | 64 | } |
| 66 | 65 | |
| 67 | 66 | return false; |
@@ -165,8 +164,7 @@ discard block |
||
| 165 | 164 | |
| 166 | 165 | return true; |
| 167 | 166 | } |
| 168 | - } |
|
| 169 | - catch (StateInvalidException $sive) { |
|
| 167 | + } catch (StateInvalidException $sive) { |
|
| 170 | 168 | // in case there is something wrong with the state, just stop here |
| 171 | 169 | // later when trying to retrieve the SyncParameters nothing will be found |
| 172 | 170 | |
@@ -193,8 +191,7 @@ discard block |
||
| 193 | 191 | try { |
| 194 | 192 | // make sure the hierarchy cache is loaded when we are loading hierarchy states |
| 195 | 193 | $this->addparms[$folderid]["state"] = $this->stateManager->GetSyncState($spa->GetLatestSyncKey($confirmedOnly), ($folderid === false)); |
| 196 | - } |
|
| 197 | - catch (StateNotFoundException $snfe) { |
|
| 194 | + } catch (StateNotFoundException $snfe) { |
|
| 198 | 195 | // if we can't find the state, first we should try a sync of that folder, so |
| 199 | 196 | // we generate a fake change, so a sync on this folder is triggered |
| 200 | 197 | $this->changes[$folderid] = 1; |
@@ -698,8 +695,7 @@ discard block |
||
| 698 | 695 | $changecount = $exporter->GetChangeCount(); |
| 699 | 696 | } |
| 700 | 697 | } |
| 701 | - } |
|
| 702 | - catch (StatusException $ste) { |
|
| 698 | + } catch (StatusException $ste) { |
|
| 703 | 699 | if ($ste->getCode() == SYNC_STATUS_FOLDERHIERARCHYCHANGED) { |
| 704 | 700 | SLog::Write(LOGLEVEL_WARN, "SyncCollections->CountChange(): exporter can not be re-configured due to state error, emulating change in folder to force Sync."); |
| 705 | 701 | $this->changes[$folderid] = 1; |
@@ -767,8 +763,7 @@ discard block |
||
| 767 | 763 | |
| 768 | 764 | $this->hierarchyExporterChecked = true; |
| 769 | 765 | } |
| 770 | - } |
|
| 771 | - catch (StatusException $ste) { |
|
| 766 | + } catch (StatusException $ste) { |
|
| 772 | 767 | throw new StatusException("SyncCollections->countHierarchyChange(): exporter can not be re-configured.", self::ERROR_WRONG_HIERARCHY, null, LOGLEVEL_WARN); |
| 773 | 768 | } |
| 774 | 769 | |
@@ -150,8 +150,7 @@ discard block |
||
| 150 | 150 | |
| 151 | 151 | // destruct backend after all data is on the stream |
| 152 | 152 | $backend->Logoff(); |
| 153 | - } |
|
| 154 | - catch (NoPostRequestException $nopostex) { |
|
| 153 | + } catch (NoPostRequestException $nopostex) { |
|
| 155 | 154 | if ($nopostex->getCode() == NoPostRequestException::OPTIONS_REQUEST) { |
| 156 | 155 | header(GSync::GetServerHeader()); |
| 157 | 156 | header(GSync::GetSupportedProtocolVersions()); |
@@ -166,8 +165,7 @@ discard block |
||
| 166 | 165 | GSync::PrintGrommunioSyncLegal('GET not supported', $nopostex->getMessage()); |
| 167 | 166 | } |
| 168 | 167 | } |
| 169 | - } |
|
| 170 | - catch (Exception $ex) { |
|
| 168 | + } catch (Exception $ex) { |
|
| 171 | 169 | // Extract any previous exception message for logging purpose. |
| 172 | 170 | $exclass = get_class($ex); |
| 173 | 171 | $exception_message = $ex->getMessage(); |