@@ -73,7 +73,8 @@ |
||
| 73 | 73 | if (is_a($stat, midcom_services_indexer_client::class)) { |
| 74 | 74 | try { |
| 75 | 75 | $stat->reindex(); |
| 76 | - } catch (RequestException $e) { |
|
| 76 | + } |
|
| 77 | + catch (RequestException $e) { |
|
| 77 | 78 | if ($e->hasResponse()) { |
| 78 | 79 | $crawler = new Crawler($e->getResponse()->getBody()->getContents()); |
| 79 | 80 | $body = $crawler->filterXPath('//body')->html(); |
@@ -122,7 +122,8 @@ discard block |
||
| 122 | 122 | try { |
| 123 | 123 | $creator = new midcom_db_person($view_metadata->get('creator')); |
| 124 | 124 | $creator_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$creator->guid}/\">$creator->name</a>"; |
| 125 | - } catch (midcom_error $e) { |
|
| 125 | + } |
|
| 126 | + catch (midcom_error $e) { |
|
| 126 | 127 | $creator_string = $l10n->get('unknown person'); |
| 127 | 128 | } |
| 128 | 129 | $created = (int) $view_metadata->get('created'); |
@@ -135,7 +136,8 @@ discard block |
||
| 135 | 136 | try { |
| 136 | 137 | $editor = new midcom_db_person($view_metadata->get('revisor')); |
| 137 | 138 | $editor_string = "<a href=\"" . midcom_connection::get_url('self') . "__mfa/asgard/object/view/{$editor->guid}/\">$editor->name</a>"; |
| 138 | - } catch (midcom_error $e) { |
|
| 139 | + } |
|
| 140 | + catch (midcom_error $e) { |
|
| 139 | 141 | $editor_string = $l10n->get('unknown person'); |
| 140 | 142 | } |
| 141 | 143 | |
@@ -575,7 +575,8 @@ |
||
| 575 | 575 | $param = $param->__object; |
| 576 | 576 | } |
| 577 | 577 | $this->_group_cache[$id] = new midcom_core_group($param); |
| 578 | - } catch (midcom_error $e) { |
|
| 578 | + } |
|
| 579 | + catch (midcom_error $e) { |
|
| 579 | 580 | debug_add("Group with identifier {$id} could not be loaded: " . $e->getMessage(), MIDCOM_LOG_WARN); |
| 580 | 581 | $this->_group_cache[$id] = null; |
| 581 | 582 | } |
@@ -87,7 +87,8 @@ |
||
| 87 | 87 | $param = $param->__object; |
| 88 | 88 | } |
| 89 | 89 | $this->_user_cache[$id] = new midcom_core_user($param); |
| 90 | - } catch (midcom_error $e) { |
|
| 90 | + } |
|
| 91 | + catch (midcom_error $e) { |
|
| 91 | 92 | // Keep it silent while missing user object can mess here |
| 92 | 93 | $this->_user_cache[$id] = null; |
| 93 | 94 | } |
@@ -81,7 +81,8 @@ |
||
| 81 | 81 | $class = $config->get_backend_class(); |
| 82 | 82 | new $class(new midcom_db_topic, $config); |
| 83 | 83 | $this->add("MidCOM RCS", self::OK, $class); |
| 84 | - } catch (midcom_error $e) { |
|
| 84 | + } |
|
| 85 | + catch (midcom_error $e) { |
|
| 85 | 86 | $this->add("MidCOM RCS", self::ERROR, $e->getMessage()); |
| 86 | 87 | } |
| 87 | 88 | } else { |
@@ -43,7 +43,8 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | try { |
| 45 | 45 | $tmp = midgard_object_class::get_object_by_guid($guid); |
| 46 | - } catch (mgd_exception $e) { |
|
| 46 | + } |
|
| 47 | + catch (mgd_exception $e) { |
|
| 47 | 48 | debug_add('Loading object by GUID ' . $guid . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_INFO); |
| 48 | 49 | |
| 49 | 50 | throw new midcom_error_midgard($e, $guid); |
@@ -163,7 +164,8 @@ discard block |
||
| 163 | 164 | |
| 164 | 165 | try { |
| 165 | 166 | return $this->get_cached($classname, $parent_guid); |
| 166 | - } catch (midcom_error $e) { |
|
| 167 | + } |
|
| 168 | + catch (midcom_error $e) { |
|
| 167 | 169 | return null; |
| 168 | 170 | } |
| 169 | 171 | } |
@@ -192,7 +192,8 @@ |
||
| 192 | 192 | foreach ($this->$identifier as $member) { |
| 193 | 193 | try { |
| 194 | 194 | $this->_request_data['group'] = org_openpsa_contacts_group_dba::get_cached($member->gid); |
| 195 | - } catch (midcom_error $e) { |
|
| 195 | + } |
|
| 196 | + catch (midcom_error $e) { |
|
| 196 | 197 | $e->log(); |
| 197 | 198 | continue; |
| 198 | 199 | } |
@@ -291,7 +291,8 @@ discard block |
||
| 291 | 291 | $url = $this->router->generate('project', ['guid' => $project->guid]); |
| 292 | 292 | $ret['project'] = '<a href="' . $url . '">' . $project->title . '</a>'; |
| 293 | 293 | $ret['index_project'] = $project->title; |
| 294 | - } catch (midcom_error $e) { |
|
| 294 | + } |
|
| 295 | + catch (midcom_error $e) { |
|
| 295 | 296 | $e->log(); |
| 296 | 297 | } |
| 297 | 298 | |
@@ -303,7 +304,8 @@ discard block |
||
| 303 | 304 | $customer_url = "{$contacts_url}group/{$customer->guid}/"; |
| 304 | 305 | $ret['customer'] = "<a href='{$customer_url}' title='{$customer->official}'>{$customer->get_label()}</a>"; |
| 305 | 306 | $ret['index_customer'] = $customer->name; |
| 306 | - } catch (midcom_error $e) { |
|
| 307 | + } |
|
| 308 | + catch (midcom_error $e) { |
|
| 307 | 309 | $ret['customer'] = ''; |
| 308 | 310 | $ret['index_customer'] = ''; |
| 309 | 311 | } |
@@ -51,7 +51,8 @@ |
||
| 51 | 51 | if ($root_topic->style) { |
| 52 | 52 | $scope = midcom_db_style::id_from_path($root_topic->style); |
| 53 | 53 | } |
| 54 | - } catch (midcom_error_forbidden $e) { |
|
| 54 | + } |
|
| 55 | + catch (midcom_error_forbidden $e) { |
|
| 55 | 56 | $e->log(); |
| 56 | 57 | } |
| 57 | 58 | } |