@@ -33,7 +33,8 @@ |
||
| 33 | 33 | { |
| 34 | 34 | try { |
| 35 | 35 | midcom::get()->cache->invalidate_all(); |
| 36 | - } catch (\Throwable $e) { |
|
| 36 | + } |
|
| 37 | + catch (\Throwable $e) { |
|
| 37 | 38 | $output->writeln($e->getMessage()); |
| 38 | 39 | } |
| 39 | 40 | $fs = new Filesystem; |
@@ -116,7 +116,8 @@ |
||
| 116 | 116 | try { |
| 117 | 117 | $object = $options['widget_config']['class']::get_cached($identifier); |
| 118 | 118 | $preset[$identifier] = autocomplete_helper::create_item_label($object, $options['widget_config']['result_headers'], $options['widget_config']['titlefield']); |
| 119 | - } catch (midcom_error $e) { |
|
| 119 | + } |
|
| 120 | + catch (midcom_error $e) { |
|
| 120 | 121 | $e->log(); |
| 121 | 122 | } |
| 122 | 123 | } |
@@ -64,7 +64,8 @@ |
||
| 64 | 64 | try { |
| 65 | 65 | $this->__object = $this->__midcom_class_name__::get_cached($this->__identifier); |
| 66 | 66 | return true; |
| 67 | - } catch (midcom_error $e) { |
|
| 67 | + } |
|
| 68 | + catch (midcom_error $e) { |
|
| 68 | 69 | $e->log(); |
| 69 | 70 | } |
| 70 | 71 | return false; |
@@ -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 | } |
@@ -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 | } |