@@ -142,7 +142,8 @@ |
||
| 142 | 142 | //create reflector with linked object to get the right label |
| 143 | 143 | try { |
| 144 | 144 | $linked_object = midcom::get()->dbfactory->get_object_by_guid($entry->linkGuid); |
| 145 | - } catch (midcom_error $e) { |
|
| 145 | + } |
|
| 146 | + catch (midcom_error $e) { |
|
| 146 | 147 | unset($data['entries'][$i]); |
| 147 | 148 | $e->log(); |
| 148 | 149 | continue; |
@@ -161,7 +161,8 @@ discard block |
||
| 161 | 161 | $response = $this->handle($this->request); |
| 162 | 162 | $response->send(); |
| 163 | 163 | $this->terminate($this->request, $response); |
| 164 | - } catch (Error $e) { |
|
| 164 | + } |
|
| 165 | + catch (Error $e) { |
|
| 165 | 166 | $this->getHttpKernel()->terminateWithException($e); |
| 166 | 167 | } |
| 167 | 168 | } |
@@ -218,11 +219,13 @@ discard block |
||
| 218 | 219 | $this->skip_page_style = true; |
| 219 | 220 | try { |
| 220 | 221 | $response = $this->handle($request, HttpKernelInterface::SUB_REQUEST, false); |
| 221 | - } catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
| 222 | + } |
|
| 223 | + catch (midcom_error_notfound | midcom_error_forbidden $e) { |
|
| 222 | 224 | $e->log(); |
| 223 | 225 | midcom_core_context::leave(); |
| 224 | 226 | return; |
| 225 | - } finally { |
|
| 227 | + } |
|
| 228 | + finally { |
|
| 226 | 229 | $this->skip_page_style = $backup; |
| 227 | 230 | } |
| 228 | 231 | |
@@ -113,7 +113,8 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | try { |
| 115 | 115 | $person = midcom_db_person::get_cached($src); |
| 116 | - } catch (midcom_error $e) { |
|
| 116 | + } |
|
| 117 | + catch (midcom_error $e) { |
|
| 117 | 118 | return $cache[$src] = new self(new midcom_db_person); |
| 118 | 119 | } |
| 119 | 120 | |
@@ -313,7 +314,8 @@ discard block |
||
| 313 | 314 | foreach ($mc->get_rows(['gid', 'extra']) as $data) { |
| 314 | 315 | try { |
| 315 | 316 | $group = org_openpsa_contacts_group_dba::get_cached($data['gid']); |
| 316 | - } catch (midcom_error $e) { |
|
| 317 | + } |
|
| 318 | + catch (midcom_error $e) { |
|
| 317 | 319 | $e->log(); |
| 318 | 320 | continue; |
| 319 | 321 | } |
@@ -381,7 +381,8 @@ discard block |
||
| 381 | 381 | try { |
| 382 | 382 | $tag = net_nemein_tag_tag_dba::get_cached($link->tag); |
| 383 | 383 | $link_object_map[$link->fromGuid][$tag->tag] = $link; |
| 384 | - } catch (midcom_error $e) { |
|
| 384 | + } |
|
| 385 | + catch (midcom_error $e) { |
|
| 385 | 386 | $e->log(); |
| 386 | 387 | } |
| 387 | 388 | } |
@@ -410,7 +411,8 @@ discard block |
||
| 410 | 411 | $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject); |
| 411 | 412 | } |
| 412 | 413 | $return[] = $tmpobject; |
| 413 | - } catch (midcom_error $e) { |
|
| 414 | + } |
|
| 415 | + catch (midcom_error $e) { |
|
| 414 | 416 | $e->log(); |
| 415 | 417 | } |
| 416 | 418 | } |
@@ -190,7 +190,8 @@ |
||
| 190 | 190 | try { |
| 191 | 191 | $obj1 = $this->load($arr1['guid']); |
| 192 | 192 | $obj2 = $this->load($arr2['guid']); |
| 193 | - } catch (midcom_error $e) { |
|
| 193 | + } |
|
| 194 | + catch (midcom_error $e) { |
|
| 194 | 195 | $e->log(); |
| 195 | 196 | continue; |
| 196 | 197 | } |
@@ -82,7 +82,8 @@ discard block |
||
| 82 | 82 | try { |
| 83 | 83 | $object1 = $this->load($param->parentguid); |
| 84 | 84 | $object2 = $this->load($param->name); |
| 85 | - } catch (midcom_error $e) { |
|
| 85 | + } |
|
| 86 | + catch (midcom_error $e) { |
|
| 86 | 87 | $i++; |
| 87 | 88 | continue; |
| 88 | 89 | } |
@@ -160,7 +161,8 @@ discard block |
||
| 160 | 161 | try { |
| 161 | 162 | $merger = new org_openpsa_contacts_duplicates_merge($this->mode, $this->_config); |
| 162 | 163 | $merger->merge_delete($object1, $object2); |
| 163 | - } catch (midcom_error $e) { |
|
| 164 | + } |
|
| 165 | + catch (midcom_error $e) { |
|
| 164 | 166 | // TODO: Localize |
| 165 | 167 | midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.contacts'), 'Merge failed, errstr: ' . $e->getMessage(), 'error'); |
| 166 | 168 | } |
@@ -49,7 +49,8 @@ |
||
| 49 | 49 | try { |
| 50 | 50 | \midgard_object_class::get_object_by_guid($param->parentguid); |
| 51 | 51 | $seen[$param->parentguid] = true; |
| 52 | - } catch (\Exception $e) { |
|
| 52 | + } |
|
| 53 | + catch (\Exception $e) { |
|
| 53 | 54 | $seen[$param->parentguid] = false; |
| 54 | 55 | } |
| 55 | 56 | } |
@@ -120,14 +120,16 @@ |
||
| 120 | 120 | if (!empty($this->customer)) { |
| 121 | 121 | try { |
| 122 | 122 | return org_openpsa_contacts_group_dba::get_cached($this->customer); |
| 123 | - } catch (midcom_error $e) { |
|
| 123 | + } |
|
| 124 | + catch (midcom_error $e) { |
|
| 124 | 125 | $e->log(); |
| 125 | 126 | } |
| 126 | 127 | } |
| 127 | 128 | if (!empty($this->customerContact)) { |
| 128 | 129 | try { |
| 129 | 130 | return org_openpsa_contacts_person_dba::get_cached($this->customerContact); |
| 130 | - } catch (midcom_error $e) { |
|
| 131 | + } |
|
| 132 | + catch (midcom_error $e) { |
|
| 131 | 133 | $e->log(); |
| 132 | 134 | } |
| 133 | 135 | } |
@@ -98,7 +98,8 @@ |
||
| 98 | 98 | if ($this->old_task) { |
| 99 | 99 | self::update_cache(new org_openpsa_projects_task_dba($this->old_task)); |
| 100 | 100 | } |
| 101 | - } catch (midcom_error $e) { |
|
| 101 | + } |
|
| 102 | + catch (midcom_error $e) { |
|
| 102 | 103 | $e->log(); |
| 103 | 104 | } |
| 104 | 105 | |